Hi. I'm trying to run a simple automation rule, that turns a switch on and off at a similar time every day. I was using Simple Automation for this rule when it was the same time, but now that I need the times slightly varied every day, I need something more accomodating.
Thanks for the reply. That's the problem, it's different times, so I would have to trigger the ON rule at the earliest time, then set a bunch of conditional delays, based on the day of the week.
My wife runs a business from home and she has some LED signage at the front, plugged into a TP-Link (Kasa) outlet.
The business used to run at the same times on the days she operated. Now the hours are modified, and, as you can imagine, it's not ideal to illuminate the signage when she is not operating.
If you wanted to stick with SA....
SA doesn't give you an option for days.
But, it allows a Date/Time variable.
Admittedly, I've only tried using a variable once, so I don't know what I'm doing.
Could a Date/Time variable be used, and how?
edit: I just tried creating a date/time variable. It's a specific date. By the time you figure out the hours, how to change the variable, etc, I do think RM would be easier with its day of week capability.
Just so I understand - Is there some consistency - like in your example, every 2 days there is a change - does this represent what is really happening, or does the variation change in a random way?
No, they are consistent, but may change in the future.
Currently:
M 10-12
T 830-330
T 830-330
F 10-12
S 830-1230
S 830-1230
If variables can be used, that would be cool, but I've not yet explored that option.
I'm thinking the simplest option would be the multiple if statements and delays, as mentioned above, or a separate rule for each day and state - that would be 6x rules though, and seems unnecessary.
I was just going to suggest this. As long as she has access to the calendar, she can adjust hours as she wants without needing to get into the guts of the rule.
Thanks everyone, I've just made 7x SA rules - one for each day of the week, and I will tweak them as needed.
Meanwhile, I'll look into the Google calendar integration. That was a thought when I first got into HE and I never revisited it. Thanks for the reminder!
If you live by your calendar like my family does the calendar integration opens up a ton of opportunities for announcements or rule execution. My kids depend on this to wake up for school each day. My neighbors depend on it to announce no mail or trash holiday notifications. I also use it for Guest coming and turning off certain automations or even unlocking my crawl doors if Terminix or HVAC guys are scheduled to come over.
You can set the polling to be as frequent as you want so your wife can adjust the calendar entry if she decides to leave early or stay late and the lights would dynamically adjust to the calendar entry vs having to adjust rules. You can have a rule trigger based on the optional child switch created by this integration or you can run rule actions directly from the app too and not require the child switch.
Please feel free to post any questions in the above linked thread.
I'm honestly very surprised nobody suggested using the Room Lighting app, along with its easy-to-implement "Time Periods" activation option, which allows you to set a different time for each day of the week. RL makes the resulting automations straightforward to edit as needed.
In this way, RL acts as a one-stop shop compared with multiple RM or SA rules. But kudos for setting things up so nicely with the awesome Google Calendar app! I would never have thought of using that for this purpose.