I have the following automation set up:
description: ""
triggers:
- trigger: state
entity_id:
- switch.sonoff_10012f1588_2
from: "off"
to: "on"
conditions:
- condition: time
after: "19:00:00"
before: "05:30:00"
actions:
- action: light.toggle
target:
entity_id:
- light.light_wc_xh_fls_cw2
data:
color_temp_kelvin: 2000
mode: single```
However, when I turn off the switch.sonoff_10012f1588_2 and turn it on again, which then turns on the light.light_wc_xh_fls_cw2, the color_temp_kelvin value resets to 6535.
I also tried creating an automation where turning off switch.sonoff_10012f1588_2 also turns off light.light_wc_xh_fls_cw2, but even that doesn't help. I've tried many things, but nothing works. That's why I'm reaching out to you for help.
What I need is for the light to turn on at 6535 kelvin during the day, but after 19:00:00 (7:00:00 PM), the light should turn on at 2000 kelvin due to children and nighttime trips to the WC 🙂
I know only part of the automation code is provided here, but even this part is not working.
Could you please help me with this?
Thank you.