I have a Teckin SB53 where I’ve divided the RGB and CWWW into two lights. Supposedly if you have them both on at the same time, it can overdrive it, so I’m trying to write an automation to shut off the other upon esphome light.on_turn_on trigger. For whatever reason, the trigger doesn’t execute upon actual “State: ON” but only when I shut it off, or modify the values of the light.
light:
- platform: rgb
name: ${friendlyname} RGB
id: ${devicename}_rgb
on_turn_on:
then:
- light.turn_off: ${devicename}_cwww
- logger.log: "RGB Light Turned On!"
red: output_red
green: output_green
blue: output_blue
restore_mode: RESTORE_DEFAULT_OFF
effects: !include effects.yaml
- platform: cwww
name: ${friendlyname} CWWW
id: ${devicename}_cwww
on_turn_on:
then:
- light.turn_off: ${devicename}_rgb
- logger.log: "CWWW Light Turned On!"
warm_white: output_warm_white
cold_white: output_cold_white
cold_white_color_temperature: 6200 K
warm_white_color_temperature: 2800 K
default_transition_length: 3s
restore_mode: RESTORE_DEFAULT_OFF
And here is the log. Note the timestamps of when the logger logs from the triggers.
[21:15:59][D][light:303]: Transition Length: 3.0s
[21:16:02][D][light:264]: 'RGB Flood 1 CWWW' Setting:
[21:16:02][D][light:273]: State: ON
[21:16:02][D][light:303]: Transition Length: 3.0s
[21:17:47][D][light:264]: 'RGB Flood 1 CWWW' Setting:
[21:17:47][D][light:273]: State: OFF
[21:17:47][D][light:303]: Transition Length: 3.0s
[21:17:47][D][light:264]: 'RGB Flood 1 RGB' Setting:
[21:17:47][D][light:303]: Transition Length: 1.0s
[21:17:47][D][main:565]: CWWW Light Turned On!