[RELEASE] Sabbath/Holiday Mode Scheduler

In case it's helpful, I'll share what I am seeing - I can see how to access the "Current States" in setting up a "Trigger"... and am doing so for Havdalah. I have not seen how to access those from the "Actions"....

I can create this example trigger, which is accessing the current state "time":
Select Trigger Events (ANY will trigger)
On Sun, Mon, Tue, Wed, Thu, Fri, Sat at Sunset-300 minutes(3:05 PM)
Shabbat and Holiday Scheduler reports times(Tue Apr 11
7:35 PM) contains %date%

But I don't seem to be able to do anything with it.... if I could get the next candlelighting date time into a variable, then I could set a conditional action that depends on it being equal to today's %date%.

What does seem workable is to set the mode from Home to Shabbat earlier - for example to increase the candle lighting time from 18 minutes to 30 or even 60 minutes. And do the same with the early Shabbat time. That way I can flash some lights and see early enough that the mode is set and the automation is running, and then delay a bit before turning on the other lights and turning off some things that need to be off....

You shouldn't be using "times" in any rules; it's not meant for that. That's what activeTime is for. All the exposed attributes are well documented in the instructions.

I think I had to develop a better understanding of what is happening when in the Sabbath/Holiday Mode Scheduler device, and how to use Unix Epoch Time (and working with GMT).
While it may not be all that useful to have an automation that reminds me that the Hubitat is going to shift to Shabbat mode later that day, but I still wanted to do it, and maybe later add some pre-Shabbat automations.

To get it to work, I created a variable in the Hubitat settings called "CurrentTime" of type "Number" with a starting value of "123456789" and then within an automation I created a local variable "nextShabbatTime" of type "Number".

For the automation, I have a daily rule triggered at 3pm. Within the actions, I am testing to see if next device activeTime is within 6 hours. If it is, then it sends me an alert (testing Pushover and the Hubitat app, but both seem to work equally well). Looks like this in Rule Machine:

Actions for Notify of next active candle lighting
set CurrentTime to now() in milliseconds
Set nextShabbatTime to Shabbat and Holiday Scheduler activeTime((1682114400000))
IF (Variable nextShabbatTime(1682114400000) <= CurrentTime(1682104373274) +21600000(T) [TRUE])
THEN
Notify Pushover: 'Next active Shabbos Candle lighting is in less than 6 hours.
Notify iPhone: 'Next Shabbos active time is in less than 6 hours.'
END-IF