Back in the Webcore days, it was easy to write a routine that would, for example, always run on Tuesday morning…unless that morning happened to be on July 4. In the new paradigm, even with the date handling Edge driver I cannot find a way to easily create a NOT condition.
What am I missing? Do I have to learn the ST Rules language to create that simple thing?
You could create a virtual on/off switch. Create a routine to turn that switch on or off on July 4th. Use the virtual switch as a precondition in the Routine you do not wish to trigger on that date. Of course, another routine to set the virtual switch back when not July 4th. Anyway, that is one method.
That could work… but I’d soon hit the 200 device limit.
In Webcore I had a piston written that calculated all observed holidays that are relevant to me. The piston concept: alert me the evening prior which refuse collection would occur the following morning, and then alert me again the following morning, There are three in my area: Monday is garbage and yard waste (such as grass cuttings). Wednesday is garbage and recycling, and Friday is garbage and rubbish.
So tomorrow is garbage and rubbish. At 7pm Alexa would announce “prepare garbage and rubbish for collection tomorrow morning. At 6:15 tomorrow morning, Alexa would announce “take garbage and rubbish to curb for collection”.
The trick to my piston: it would calculate all OBSERVED holidays, and turn off the alerts for that morning and the prior evening. Last year, New Years Day fell on Sunday - but was observed Monday. Garbage collection does not occur on the observed holidays. Therefore, my piston would NOT alert me that Sunday night… and would NOT wake me at 6:15 am on a holiday where trash is not being collected.
There are clear rules around observed holidays. President Day is always the second Monday in February, for example. If July4 falls on Saturday it’s observed Friday; if it falls on Sunday it’s observed Monday. Etc. So the calculations are not simplistic, but not overly complex. The Date, Day etc tools in Webcore made it easy.
Perhaps if I decide to delve into Edge, I could write a device similar to the Virtual Calendar device.
Or @Glen_King it would be easier just to buy a Hubitat, any version, stick webCoRE on there, and your piston would run and announce on your Alexa, locally, something it couldn’t do on ST.
I was referring to webCoRE being local on ST, if you want speakers being local also you’d have to investigate that yourself, depending on what you’re sending I guess…