Good afternoon everyone…
I am trying to code automation’s for my outside lighting.
I want sunrise - a few minutes to turn on some switch and after plus 2 hrs back off and in the same automation suntset + a couple minutes another turn on plus 2hrs and than back off again to have light in the morning and in the evening but not over night. i found a couple options but wasnt successful yet besides this embarrassing version of my own which does not survive a reboot or such:
I tried a couple blueprints but it seems that 2 switch times in one automation, especially with sunset/rise or position noone did so far.
Hope for ideas…thx alot in advance
by the way, you should avoid using device_id’s. read this to understand why:
i’m surprised the blueprints don’t let you do mutliple lights. are you usre? which one? but if you want to use a blueprint and for some reason it doesn’t allow multiple lights, you could make a single light group and use that in the blueprint.
I copied your solution and tried to run it…which it did not do and in “Traces” i get that message which assume is a hint on what is not doing it.
So i was wondering if this solution works in your environment to find out what i need to change to get it working for me as well…cause i like the sleek design
Again, what do you mean? Are you saying you clicked the “Run” button? Doing that skips the triggers, so trigger.id has no value for the automation to use.
Hello again…
I tried and tested and your option is just working like charm
Already switched all my other switch timers to that pattern.
Awesome, thx and this should be a sticky or a wiki entry for best practice!!!
if you like his solution, you should mark his post as the solution to this question. that will “sticky” it as the solution and put it right with your original question.