I’m a little confused with the Offset capabilities in Astro. Lack of sleep isn’t helping.
I had this working in a previous version, but I fat fingered the install and broke the damned thing, so can’t refer back. My config (1114, snapshot) is purely PaperUI configured, with a single .rules file.
Basically, I’m struggling with the offset function. For example, I have the Civil Dusk Start Time, offset by -120, which is roughly when it starts to get dark and I need some lights to start to function.
Viewing the string of this thing, gives me the right output, but when I believe the rule should trigger, it does not. I read somewhere I need the offset on the event, but doing that resulted in the End Time also being brought forward by 2 hours (-120), regardless of using “…#event triggered END”
I’m sure I’ve just got a small “typo” unless, Im completely misunderstanding Astro. The rule is below, my concern is around the “trigger”.
I know I could manually add some new offset channels to my thing, using a .things, but I’m trying to stay fully PaperUI
rule "Twilight Started"
when
Item Twilight changed to ON or
Channel 'astro:sun:local:civilDusk#event' triggered START or //civilDusk with -120 offset, starts to get dark from here
Item TimePeriodOfDay changed to Twilight
then
logInfo("EXTRA", "Its Twilight: " + now)
logInfo("EXTRA", "Channel astro:sun:local:civilDusk#event triggered START")
sendMail("blah@prowl.com", "Time of Day", "Its Twilight: " + now)
Dawn.sendCommand(OFF)
Morning.sendCommand(OFF)
Day.sendCommand(OFF)
Twilight.sendCommand(ON)
Evening.sendCommand(OFF)
Night.sendCommand(OFF)
TimePeriodOfDay.postUpdate("Twilight")