Hi, in my family room I have an 8-button KPL, an OutletLinc plug linked to it on button 7, and it works great. Press button 7 and the plug goes on and the led for button 7 lights. Press it again, plug turns off and led for button 7 reverts to its off state. The problem I solved was that using indigo touch, although I could toggle the plug, I desired the KPL button to track the plugs onState.
So on my indigo graphical layout for my family room, I created a button to toggle the OutletLinc for the first step, then added a 2nd step with the following Python script.
if indigo.devices("FamRmPlug").onState:
indigo.devices.setLedState("FamRmKPL", 6, True)
else:
indigo.devices.setLedState("FamRmKPL", 6, False)
....which does just the exact opposite as what I expected.??
I reversed the statements and it all works right. ...
if indigo.devices("FamRmPlug").onState:
indigo.devices.setLedState("FamRmKPL", 6, False)
else:
indigo.devices.setLedState("FamRmKPL", 6, True)
So what is going on here? I set the outlet state prior to executing this python code.
TIA, Al.