Simple Automation Rule Between two times

Not sure if this is the proper subcategory but here goes:

Looking to activate an Iris Plug which operates a wall heater in a bathroom.
Iris Plug communicates with an Ecobee Sensor in the bathroom.

Tried to set it up via Simple Automation Rule but canā€™t specify it to activate between two separate times (7:00 am - 8:00 am then 7 pm - 9 pm) and only on when under 74-degrees.

I was able to do one rule with only one time frame, and unable to rename this SAR. Unsure if I could create another similar rule separately for the second time frame.

Any help would be greatly appreciated. Thank you.

You can create as many SARs as you want. Sometimes having separate rules is the only way to do things. So you can go ahead and create one Simple Automation rule for 7-8 am, and a second rule for 7-9 pm. Nothing wrong with that.

7 Likes

@bertabcd1234 - Unfortunately for all of us I have some free time this AM and found this interesting to play around with. Just wondering, if one were to write a "between two times, two times" rule in RM, would this be an efficient approach? I'm betting you know a better way...interested generally in the best way to handle something like this in RM. :slight_smile:

I don't really like writing rules that way--it's more work in the actions to figure things out, and if you're doing two entirely different sets of actions based on different triggers, I think it makes more sense for them to be separate rules rather than shoving it all into one and having to do the work in your actions to figure things out.

From the hub's standpoint, they'd be about equal (minus the bit of extra work it has to do to process the actions, including evaluating the conditions)--it's just a matter of whether you have one app that schedules a job for 7 AM and another for 7 PM, or one that schedules two jobs.

A third approach is to trigger at 7 AM, do the first set of actions, add a "Wait for event: time is 7 PM," then do the last set of actions. This rule will schedule something at 7 AM then add a subscription for 7 PM when that action is reached. It's cleaner than the above rule, but a bit more fragile in that the 7 PM stuff won't happen if the 7 AM schedule was missed that day for some reason (e.g., you were rebooting for an update at that exact moment). Not saying it's better or worse. :smiley:

2 Likes

Thanks for the additional info and context. I had thought about using "Wait" to write it as you note, but ended up choosing the conditional approach for no explicit reason, other than maybe I think the If/Then structure looks cooler. :wink:

Thanks everyone for all of your help. I think i have it running with a simple automation rule.

1 Like

As long as you're exploring options/approaches, one tool you could take a look as another option for your automations is Event Engine. It's a "point and click" app that allows you to create automations with a wide range of complexity, from very simple to quite complex, by selecting devices, options, and settings in the app. Covers the range from Basic Rules/Simple Automations up to Rule-machine level complexity.

Event Engine - This is not available in HPM, it's installed from Bundle Manager, next link below:

Bundle Manager: Event Engine is installed from the Bundle Manager app, below. The Bundle Manager is available in HPM:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.