Basic question related to device triggers

I feel a bit stupid asking this as it seems very simple and I was a very good developer back in the day...

How do you get a Lamp to turn OFF when a Light is turned OFF? Currently the Lamp is ON and the Light is OFF.

Thanks, Glenn

Personally, I'm not sure what you mean.
I'm going to assume that the lamp and the light are two entirely different devices.
If this is the case then have a rule.
When light changes is OFF
Turn OFF lamp.

Do you already have a rule?
Post it here if so and the boffins can take a look. (I'm not putting me in that category BTW. :wink: )

1 Like

Yes, the lamp and the light are two separate devices.

What rule trigger would you use? Neither changed or turned off would work since the light is already Off.

It should be:

The problem is this trigger will only fire if the light is On and you turn it Off. If it's Off and you either hit the wall switch to turn it Off it won't fire and therefore will not turn the lamp off.

Is the wall switch smart as well? I need a few more details on what you are trying to achieve.

Forget about it being a physical light switch or assume its a z-wave plus. Either way, the logger sees when the Off button has been pressed. The issue is if the switch is already Off and you turn it Off the trigger doesn't fire. If the switch is ON and you turn it Off it works fine.

Basically I want to know if the Off button was pressed regardless of the current state of the switch.

Trigger: Switch XYZ changed

IF Switch XYZ turns on
THEN turn on switch ABC

ELSE IF XYZ turns off
THEN turn off switch ABC

ENDIF

The switch does make a difference as some switches also expose button events (my GE Z-Wave fan controls do that, but my Zigbee dimmers don't). You could try Button as a trigger, but I'm not 100% sure what kind of device you have, so I can't really tell you if the event would be captured or not.

I think you are right, it needs to be a button event not a switch event.

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