How do I generalize a rule across named devices?

Hey all,

can't for the life of me figure out how to generalize the following across my 10-odd thermostats and active vents pairs.

This is using RM5. I don't want to maintain separate rules for each of those instances. Any hints/ideas/tips?


You can't, at least not in an easy/clean manner. You'll have to create a separate rule for each. To make that easier, you could use the export/import/clone feature, so you don't have to re-write the whole thing every time. This could be done fairly easily with a custom app, aside from the startup cost of writing said app. :slight_smile: (Could help if you wanted.)

You may be asking if there is a "dirty" way to do this since I didn't exactly say it was impossible, and there more or less is: the built-in %device% variable contains the name of the triggering device (note, not a reference to the actual device). So, you could assign that to a "real" variable (e.g., a local string variable in the rule), do an IF THEN plus a bunch of ELSE-IFs (and an END-IF) to compare that variable to a specific device name, then act accordingly. But this is, I think, a pretty bad idea since it will break if you ever change device names (or make a typo setting things up). It also won't really work if you might change multiple thermostats/vents at the same time, a single rule will not play well with multiple sets of repeating action (a stop will stop them all, and I'm honestly not even sure it was designed to have multiple ones going in the first place so don't know if/how it would handle that to start with).