Trying to get this to work but the lovelace switch always goes to off when I try to activate the automation. The script is meant to check if it’s after sunset and if yet, change the color temp of a light if it’s already turned on.
- id: '1543137351646'
alias: Galerie to Color Temp 454 after Sunset Check every 15 minutes
trigger:
- minutes: /15
platform: time
seconds: 0
condition:
- condition: sun
after: sunset
- condition: state
entity_id: light.galerie
state: 'on'
action:
- data:
color_temp: '454'
entity_id: light.galerie
service: light.turn_on
Have I mentioned that I really dislike the automation editor?
It puts things in a strange order (alphabetical) compared to what you are expecting to see using pretty much every example in the docs and on the forums. It …usually…still works OK but it looks strange to people who try to help you when they are used to seeing it the other way. Then they go down a rabbit hole “fixing” something that might not be broken just because it “looks wierd”.
It would be better for you to learn to code your automations manually. You avoid the issues that keep popping up with using the editor and it helps you understand what is going on so that if something doesn’t work then you can learn to try to troubleshoot it yourself.
Yes, it mostly works. until it doesn’t. then it adds that much more confusion in trying to troubleshoot something that “should” work.
“Is it the logic? is it the editor flaking out? is it something else entirely?”
It really isn’t that hard to learn to code them yourself. Especially for the basic kind of automations that the editor will allow you to create. And for the more advanced automations (involving templates, etc) you’ll have to learn how to do it manually anyway.