I would like to use a global variable as the "time of day" (aka "certain time") in a trigger. Is this possible?
My goal is to be able to change when a "Late" mode turns off the lights. My lights to turn off are spread over 6 rules. So if I can't use a global I will have to change 6 rules if the "late" time changes.
i.e.
In the "Normal" mode:
I have 6 groups of lights (one is a scene) all starting and going off at different times.
In the "Late" mode:
All 6 groups will not turn off at the Normal mode but will turn off at 1:00 AM
I would like to use a global for the "1:00 AM" time.
A related question.:
Is it possible to use "Sunset" as a variable in a condition?
I.e. if Sunset is 6pm or earlier do this, if not do that?
Is that possible somehow?
No, this isn't directly possible per se. The way I handle this is with a special mode. For example, I have a mode called Dawn. A rule sets the mode to Dawn at 6 am. But it only does this if the time is between 5 am and Sunrise. So, in the summer when sunrise is before 6 am, Dawn mode doesn't happen. Apps can use Dawn mode to affect what they do, and what level lights are set to, and conditions could be based on it being Dawn mode.
Something similar could be done with a Dusk mode.
You could also have a rule based on the timing of Sunset. Set a variable true at sunset, false at sunrise. Then, the condition
IF(sunsetVar = true AND Time Of Day between 4:00 PM and 6:00 PM) THEN
It would be great if there was though. With a connector that could adjust the time on a dashboard, and the ability to compare it to the current time, or use it as a scheduled time, it would be a real asset IMO, and one of the final pieces in the jigsaw.
To work round it, I currently have a system using various GVs to convert desired event times into minutes past midnight and then check it each minute against the calculated current minutes past midnight.