'Track Event Switch' - What does it do?

While editing rules I came across the 'Track Event Switch' option as shown below:

What does it do? Can anyone provide a brief explanation/use case. I did peruse the docs but didn't find anything.

1 Like

This is a recent expansion of "Track event dimmer," a longstanding RM feature that I don't think has made its way to the new docs yet (I'll look at doing both).

The "event switch" or "event dimmer" refers to the device that triggered the rule (often with a trigger of switch changed or level changed). Enabling the "track event switch?" option will send an "on" for this action if the rule was triggered by a switch turning on or an "off" if it was triggered by the switch turning off (this is an alternative to using the "Turn on or off?" option, which will disappear when the "Track event switch?" option is enabled). Similarly" Track event dimmer," which this was based on, will set the level of the selected devices to the level of the device that triggered the rule. So, it really only makes sense to use "Track event switch" if you have a switch attribute as part of your trigger (or a dimmer/level attribute for "Track event dimmer," or both if you use both).

5 Likes

So would it be better to call the "Track event switch", "Track trigger switch" (or device)?

i cant seem to figure out a way to make this work.

i have a virtual switch that when turned on i need a switch/plug to flash and when the virtual switch turns off i need the flashing to stop. so far this works.

what i also want to do is to track the state of the switch/plug so if it was on when the rule fired it would stay on when the flashing stops. or if it was off when the rule fired it would stay off when the flashing stops.

Any ideas on how to make this work?

1 Like

Your question sounds completely unrelated to anything discussed in this topic, which is also now quite old. It may have been best to start a new one.

In any case, what you're looking for sounds like the "Capture" and "Restore" actions Rule Machine offers.

thanks. i'm fairly new to hubitat.

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