Starting with a positive, I am using a comparison with DAYLIGHT in several scripts to make them behave differently depending on the time of day.
I’ve not had quite as much luck trying to use Civil Dusk to trigger a rule. I have this set up:
When I set it up, much earlier today, I was encouraged to see that the box at the top changed to show what looked like the right time. However, perhaps strangely, it is still showing the same time although the local time here is now well past 16:03 - should it maybe have moved to tomorrow’s time by now?
I have then set the rule trigger up like this:
Unfortunately 16:03 came and went and nothing happened.
Any clues on what I have done wrong would be appreciated.
This is the expected behavior for the astro items. The item has a DateTime state that contains the precise time the event will occur that day. At midnight each day all the astro items will change to the correct time for the new day. Astro items do not change at the time of the event.
This is the correct way to go, and you’ll note it actually doesn’t even use the item, it uses a trigger channel instead (see here). So the actual question is why didn’t the rule do what you were expecting. You’ll have to show us the full rule for us to find out.
No. Sunset today is at 16:03. At 09:00 today, sunset will be at 16:03. At 20:00 today, sunset was at 16:03. Today’s sunset is 16:03 all day long.
What you are looking for to make a rule run at sunset does not involve an Item - you want to use the event channel of similar name as a rule trigger. Lots of examples in this forum.
Afaik the trigger event should be „START“ in capital letters. I guess this is the reason why your rule did not fire.
Rossko57 and JustinG
It seems like my brain is a little sore today - now you have explained how the times will update at midnight, it’s pretty obvious. Thanks also for the pointer to rule triggers - quite a bit of a learning curve going on here.
That link to the concepts helps greatly, JustinG - thanks for the pointer.
Lots of examples in the forum - yes indeed, several hours spent earlier getting more and more confused. Hopefully all sorted now.
Thanks for that extremely good spot - I shall update my rule and see what happens tomorrow.
Thanks for the input everyone - and have a great New Year!