Hi all,
Somewhat involved question (that probably has a straightforward answer) as I’m getting lost trying to update an existing rule. I am on 2.3.6.146 (I’ve followed the basic tenet “if it’s working, no need to take risks with upgrades, and I have had upgrades make some things not work).
Basics: I have a couple of rules for random on/off for lights when we’re away. Right now, they look something like this, and they work:
I have a couple more plug devices and want to add a few more. I also want to add a little more control by having the onTimes for the various lights be season-dependent (maybe based on DST). I can make a Hub variable for Season and set to Winter/Summer in a rule (question about this below). No issues there. However, if I think about trying to set the onTime and offTime in the rule based on this, it seems that I have lost my Trigger. I can trigger on Season (Winter/Summer) and use that to set onTime and offTime. But it seems I can’t also trigger on Time of Day = a variable. So, I don’t think that this will work to actually Trigger at these variable times.
Since I will want different OnTime/offTime for the different lights, I can’t just set onTime and offTime by season. I could have them all in one app and simply have an IF statement that triggers on the earliest onTime and then add delays…if the delays were non-blocking, which I’m sure they’re not. Since they likely block, it would stay in the IF clause until all lights turned on, which would prevent any lights turning off before the last light turned on.
I could also set the earliest onTime by season, have all of the apps trigger on this and then just put individual delays in each app for that light, and they would be independent.
I’m looking for thoughts on how best and most elegantly to make this happen. Maybe it’s easier than this and I’m just overthinking/missing something obvious
Second question: For setting the Season (or base time) based on DST changes, is it sufficient to just sent once with logic for second Sunday in March and first Sunday in November, rather than setting for each day in the range? Any chance that setting once risks losing the value at some point (we have solar and battery backup, so power outage to the unit is unlikely).
Finally, if I have 4 or 5 apps for this, is there any way to slave all of these to a master rule (sort of like subroutines) to turn then all to Pause/Resume as a group, rather than individually?
Thanks for thoughts on this.
Cheers.