dev = indigo.devices[1037032239] # My "Office KeypadLinc"
# Example that turns ON button #4's LED if it is currently OFF:
if not dev.ledStates[3]:
indigo.relay.setLedState(dev, 3, True)
# Example that turns OFF button #4's LED if it is currently ON:
if dev.ledStates[4]:
indigo.relay.setLedState(dev, 4, False)
tell application "IndigoServer"
if value of variable "BedroomDenon" is "PWON" then
turn on "Master Bedroom-Main Light"
else
turn off "Master Bedroom-Main Light"
end if
end tell
indigo.dimmer.setLedState(675337121, index = 7, value = True)
indigo.dimmer.setLedState(220572655, index = 1, value = True)
if (indigo.devices[1353496914, index = 2].onState == True): # Test "myNewDevice" state...
indigo.insteon.sendSceneOn(51)
else:
indigo.insteon.sendSceneOff(51)
dev = indigo.devices[1435361545] # "KeypadLinc"
if dev.ledStates[2]:
# button 3 is on - the ledStates array is a Python array which is 0-based
dev = indigo.devices[1435361545] # "KeypadLinc"
if dev.states["keypadButtonLed3"]:
# button 3 is on
dev = indigo.devices[1353496914] # "KeypadLinc"
if (dev.ledStates[3] == True):
# button 3 is on - the ledStates array is a Python array which is 0-based
indigo.insteon.sendSceneOn(51)
else:
indigo.insteon.sendSceneOff(51)
Users browsing this forum: No registered users and 24 guests