mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
esphome:
|
|
name: light-initial-state-test
|
|
host:
|
|
api: # Port will be automatically injected
|
|
logger:
|
|
level: DEBUG
|
|
|
|
output:
|
|
- platform: template
|
|
id: test_red
|
|
type: float
|
|
write_action:
|
|
- lambda: ""
|
|
- platform: template
|
|
id: test_green
|
|
type: float
|
|
write_action:
|
|
- lambda: ""
|
|
- platform: template
|
|
id: test_blue
|
|
type: float
|
|
write_action:
|
|
- lambda: ""
|
|
- platform: template
|
|
id: test_restore_and_on_output
|
|
type: float
|
|
write_action:
|
|
- lambda: ""
|
|
|
|
light:
|
|
- platform: rgb
|
|
name: "Test Light"
|
|
id: test_light
|
|
red: test_red
|
|
green: test_green
|
|
blue: test_blue
|
|
restore_mode: ALWAYS_OFF
|
|
initial_state:
|
|
color_mode: RGB
|
|
state: true
|
|
brightness: 0.75
|
|
red: 1.0
|
|
green: 0.5
|
|
blue: 0.0
|
|
|
|
- platform: monochromatic
|
|
name: "Test Restore And On Light"
|
|
id: test_restore_and_on_light
|
|
output: test_restore_and_on_output
|
|
restore_mode: RESTORE_AND_ON
|
|
# Simulates a stale/persisted zero brightness: RESTORE_AND_ON always forces the light
|
|
# on at boot regardless of the recovered state, so a leftover brightness of 0 must not
|
|
# leave the light on-but-invisible.
|
|
initial_state:
|
|
color_mode: BRIGHTNESS
|
|
state: false
|
|
brightness: 0%
|