Time in a variable as a Rule trigger

Is it possible to set a routine up so that something (say a group of switches), turns on or off at a specific time that is stored in a variable instead of hard coded?
Thanks
c8 with latest updates.

Yes, Rule Machine with a "Certain Time" trigger has the option to use a hub variable as the time.

1 Like

Awesome. Thank you.

I was also just checking on this in RM, so here is my screenshot on how it looks.
The option to use a variable only shows up if you have a Hub Variable created.

I have been in this area a lot over the last month or two - it's a bit deceptive here. Variable time really is 'Hub Variable' time only. It's unclear to me why this limitation but be aware. Hub Variables (I think they used to be called hub global variables). It's a distinction that has broader implications.

Hub variables and global variables are different, and "hub global variables" was never a term. (Global variables are an older feature from Rule Machine Legacy; had they been created first, hub variables probably would have been called global and both wouldn't exist, but that's the history...)

It is the case that variable time triggers in RM work only with hub variables. It cannot work with an arbitrary device attribute that just happens to be formatted as date/time, likely for a combination of reasons including the fact that device attributes are not variables, date-formatted attribute values haven't really been standardized on the platform, and interesting issues that don't arise with other "regular" attribute triggers (where the event/change itself possibly triggers the rule rather than possibly scheduling something).

In your case, assuming this is related to your recent posts, you could simply make the driver generate an event that RM can handle (which is literally any event since it supports custom attribute triggers, but having the driver push a virtual button of its own, turn on a momentary switch, or just momentarily change the value of any custom attribute you create would be easy options). You've likely figured something out by now. In any case, this is distinct from what the OP is asking given that it involves "real" variables.