Time Of Day Set Variable Rule


Hello,

I am new to Hubitat and a ST/Webcore switcher. In ST, I handle complex modes changes by using a series of virtual switches to force a mode switch. I am trying to get away from all this as I build this new system. At first I thought I would use mode manager, but the restriction logic in that app is not deep enough it seems to make decisions about swapping to modes like "guests" and then finding its way back to wherever it should be once I release guest mode.

Instead, I would like to combine multiple variables into a string that a rule could recall to make decisions about what mode to be in. Any change in that string would be the trigger to decide a mode. I have started with some time of day logic, which would be the first number in my string, as seen in the screen shot attached. Being new at rule machine, I have a few questions.

  1. I set the trigger to run once a minute to check what time it is and set variable, but the logs only show it once an hour.

  2. I have a feeling that a periodic schedule trigger may not be the best way to execute this rule, it seems like running it so often would put unnecessary strain on the Hub? Is there a better way to trigger this?

  3. I realize I could likely solve this issue by breaking it into three separate rules, but I am also trying to keep logic consolidated into as few rules as possible. Not sure if maybe that's the better way to deal with this?

Thanks in advance for advice and help!

Much easier to just use three triggers for your rule.

Specific Time of 8:00am
Specific Time of Sunset - 60min
Specific Time of Sunset + 5

This way your rule fires three times a day, instead of trying to run it once a minute.

You can still use conditional logic to set your variable.

2 Likes

What you have selected for a trigger is to run on the first minute of every hour. Thus it only runs every hour.

There is a periodic schedule that will run every minute. There is a slider every n minutes. Select that and select 1 minute, your trigger will say every one 1 minute.

Without knowing what it is your trying to do beyond this rule it's hard to say, but having it run every minute is probably not the best idea, although the rule really isn't doing much.

Why can't you just trigger at every time starting time point and change the value then. 8:00AM, sunset-60, etc.

Thank you! I figured this was likely the solve, but wanted to see if I was missing something simple.

1 Like