The first line looks nicer, but doesn't work (order of execution issue?). The second line works, but is ugly. I suspect there is a more compact way to write an expression to test the onState of 4 devices (AND condition)
- Code: Select all
# if not (led1.onState and led2.onState and led3.onState and led4.onState):
if (not led1.onState and not led2.onState and not led3.onState and not led4.onState):
indigo.device.turnOff(1580115691) # desk lamp