Multi-Temperature light

Hello Community,

I have a type of ceiling light that operates as follows:

Switch On: Cool White light
Switch Off and On within 10 seconds: Warm light
Switch Off and On within 10 seconds: Both Cool and Warm lights turn on in the unit for full power/light.

I am trying to create an automation to turn on warm light between 22:00 till 5:00. So if I press the button on my Tasmota-Flashes Sonoff switch, HA will intercept the press and quickly switch off and on again to be in the warm light mode.

I have tried setting up scenes but unsuccessful. What is your advice to approach this automation? Thank you.

  - platform: state
    entity_id: binary_sensor.your_button
    to: 'on'
  - condition: time # time conditions can span midnight
    after: '22:00:00'
    before: '05:00:00'
  - condition: state  # only if the light is off, if you dont want this, remove it.
    entity_id: light.your_warm_cool_light
    state: 'off'
  - service: light.turn_on
    entity_id: light.your_warm_cool_light
  - delay: 1
  - service: light.turn_off
    entity_id: light.your_warm_cool_light
  - delay: 1
  - service: light.turn_on
    entity_id: light.your_warm_cool_light

If the button is used in Tasmota to control the light you will have to decouple this and add another automation in Home Assistant to control the light outside the specified times. It has been ages since I used Tasmota but the option you are looking for is probably SetOption114. Buttons and Switches - Tasmota

ESPHome would probably be better than Tasmota for this as you could do all the automation on the device.

1 Like