Rule Machine - Track Event Dimmer Enhancement

@bravenel
This is a suggest for what (i think) is a simple enhancement for the Set Dimmers and Bulbs / Track Event Dimmer feature (or Control Switches).

Can you also add an option "Also Track Event Switch" - this would allow the "Set Dimmers and Bulbs" / "Set Dimmer" function to be able to mimic the "Mirrors" app from within the more complex rules of Rule Machine.

Better yet (or more flexible), perhaps this is a "Control Switches, Push Buttons" Action option to "Set switches to event device" or something like that.

I'm not sure what you're actually wanting to happen. Track Event Switch, when setting a switch? That wouldn't be part of Set Dimmer, but rather an option in 'Turn switches on/off'. ??

Set Dimmer only does a setLevel command.

You're right - a Track Event Switch is really what I'm talking about.

The desire for this came up when working with some rules using Track Event Dimmer -- though that just does "setLevel" as you point out most (many) drivers implement setLevel such that, if the device Switch is off, a setLevel other than 0 will also cause the Switch to go on; however setLevel = 0 often turns off the Switch while preserving the level attribute so the Track Dimmer doesn't work.

I'm not sure how to get around this unless Track Event Dimmer tests for this specific situation, since the last event value isn't 0. It doesn't seem as though adding Track Event Switch is right fix. Maybe track dimmer just should check if the last event device is off, and if so, turn off the tracking device.

I assume that what you want to happen is if the tracked device turned off, you want the tracking devices to turn off also.

I think the simple answer is from your original reaction that what I was really looking for is a Track Event Switch.

A rule that wanted to track both the Level and the Switch would then include two triggers to activate the rule - Switch Changed and "Dimmer changed -- this way, it would pick up on any of a group of devices turning on, off, or having a level change.

In the rule body itself, you could then use both "Set Switch" with the new "Track Event Switch" option together with the Set Dimmer with the current Track Event Dimmer option to cover all change cases.

Thus, for example, if there was a Set Level = 0, the rule triggers due to the Switch changed event and everything gets set to "Off" due to the "Track Switch Event", otherwise its an On event and the setLevel operates as it now does.

I guess you're right because setLevel(0) command won't generate a setLevel event for those devices that just turn off, so track dimmer would never happen. It would only generate a switch off event. So it would take both track dimmer and track switch to track that this had happened.

1 Like

Yes, that's the problem I ran into, so if you could consider a "track switch event" for a future release, that would be appreciated.

Next release.

1 Like

Download the Hubitat app