Hi,
Is it possible to create a variable that is the number of lights turned ON ?
Or number of open windows etc.
If yes - what to do?
list=[799923553,1996809732] # <-- here the list of devices you like to count if lights are on/.off either use the ID's
list=["LeoCeilingLight","KonsCeilingLight"] # or names
vari="lightsOn"
try:
indigo.variable.create(vari,"0")
except:
pass
count =0
for nextLight in list:
dev=indigo.devices[nextLight]
if dev.states["onOffState"]: count+=1
indigo.variable.updateValue(vari,str(count))
719674580 switch for insteon modem: accumEnergyTimeDelta("17532043"), accumEnergyTimeDelta.ui("17532043 seconds"), accumEnergyTotal("7.622"), accumEnergyTotal.ui("7.622 kWh"), curEnergyLevel("1.588"),
: curEnergyLevel.ui("1.588 W"), onOffState("True"),
397127077 StudyLights: brightnessLevel("0"), onOffState("False"),
1860008679 SmokeBridge: onOffState("True"),
list=["LeoCeilingLight","KonsCeilingLight"]
list+=[799923553, 123456,"deviceA"] # you could do device # or names or mix them if you like
kw123 wrote:Yes but onOff is not just for lights.
Users browsing this forum: No registered users and 2 guests