Is this possible in PLEG?

Hi. I’m about to install 2 qubino dimmers in my kitchen. And with them I can use I2 with a pushbutton as a sensor to trigger other things.

Will it be possible to use it with PLEG as followed?

If sensor1 is triggered an lamp2 is off - turn lamp2 on
If sensor1 is triggered an lamp2 is on - turn lamp2 off

So if I can figure this out I can dim lamp1 with one button and toggle lamp2 with the other

Something like that should be possible but you may need to use sequence expressions so the Conditions only fire if the trigger happens after the lamp state has changed. Otherwise, you could get rapid on/off switching until you released the button.

But the button will be monostable… So The “click” wouldn’t be that long…

So, how would the expression look like?

So, how would the expression look like?

Conditions
DoLamp2On Sensor1 and !Lamp2 and (!Lamp2; Sensor1)
DoLamp2Off Sensor1 and Lamp2 and (Lamp2; Sensor1)

Thanks a lot. That works like a charm.
Finally i can make a good use of the second input on the qubino dimmers :smiley: