Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: sofa_light_1
- platform: ESP8266
- board: esp01_1m
- on_boot:
- - priority: -10
- then:
- - light.turn_on:
- id: sofa_light_1
- brightness: 00%
- red: 0%
- green: 0%
- blue: 0%
- white: 80%
- wifi:
- ssid: "REDACTED"
- password: "REDACTED"
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Bulb Test Fallback Hotspot"
- password: "REDACTED"
- captive_portal:
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- password: "REDACTED"
- ota:
- password: "REDACTED"
- output:
- - platform: esp8266_pwm
- id: output_red
- pin: GPIO14
- - platform: esp8266_pwm
- id: output_green
- pin: GPIO12
- - platform: esp8266_pwm
- id: output_blue
- pin: GPIO13
- - platform: esp8266_pwm
- id: output_white
- pin: GPIO4
- light:
- - platform: rgbw
- name: "sofa_light_1"
- id: sofa_light_1
- red: output_red
- green: output_green
- blue: output_blue
- white: output_white
- gamma_correct: 1.0
- effects:
- - strobe:
- - random:
- - strobe:
- name: Rainbow
- colors:
- - state: True
- brightness: 100%
- red: 100%
- green: 0%
- blue: 0%
- white: 0%
- duration: 500ms
- - state: False
- duration: 250ms
- - state: True
- brightness: 100%
- red: 0%
- green: 100%
- blue: 0%
- white: 0%
- duration: 500ms
- - state: False
- duration: 250ms
- - state: True
- brightness: 100%
- red: 0%
- green: 0%
- blue: 100%
- white: 0%
- duration: 500ms
- - state: False
- duration: 250ms
- - state: True
- brightness: 100%
- red: 100%
- green: 0%
- blue: 100%
- white: 0%
- duration: 500ms
- - state: False
- duration: 250ms
- - state: True
- brightness: 100%
- red: 100%
- green: 100%
- blue: 0%
- white: 0%
- duration: 500ms
- - state: False
- duration: 250ms
- - state: True
- brightness: 100%
- red: 0%
- green: 100%
- blue: 100%
- white: 0%
- duration: 500ms
- - strobe:
- name: RGB
- colors:
- - state: True
- brightness: 100%
- red: 100%
- green: 0%
- blue: 0%
- white: 0%
- duration: 500ms
- - state: False
- duration: 250ms
- - state: True
- brightness: 100%
- red: 0%
- green: 100%
- blue: 0%
- white: 0%
- duration: 500ms
- - state: False
- duration: 250ms
- - state: True
- brightness: 100%
- red: 0%
- green: 0%
- blue: 100%
- white: 0%
- duration: 500ms
- - state: False
- duration: 250ms
- - strobe:
- name: Red
- colors:
- - state: True
- brightness: 100%
- red: 100%
- green: 0%
- blue: 0%
- white: 0%
- duration: 100ms
- - state: False
- duration: 150ms
- # Ensure the light turns on by default if the physical switch is actuated.
- restore_mode: RESTORE_DEFAULT_ON
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement