I have a simple 3 strip led above kitchen counter top controilled by dimmers (k_hood_ltv k_hood_lmain k_hood_lplita).
One of the strips is located just above the tv (NH_LG) - so i am switching it off when tv is on and vice versa.
Light is switched on from the button - (K_hood_bl).
I managed to write the rules and everything works - but to me it seems i made it cumbersome and there must be a better way/ Any ideas?
rule "Kitchen light on" when Item K_hood_bl changed from OFF to ON then if (NH_LG.state==ON) { k_hood_lplita.sendCommand(100) k_hood_lmain.sendCommand(100) } if (NH_LG.state==OFF) { k_hood_lplita.sendCommand(100) k_hood_lmain.sendCommand(100) k_hood_ltv.sendCommand(100) } end rule "Kitchen light off" when Item hood_but_light changed from ON to OFF then { k_hood_ltv.sendCommand(0) k_hood_lmain.sendCommand(0) k_hood_lplita.sendCommand(0) } end rule "LGTV light off" when Item NH_LG changed from OFF to ON then if (k_hood_lplita.state==100) { k_hood_ltv.sendCommand(0) } end rule "LGTV light on" when Item NH_LG changed from ON to OFF then if (k_hood_lplita.state==100) { k_hood_ltv.sendCommand(100) } end