Running this gives me the following error message in my event log:
- Code: Select all
Script Error CompanyCheck.Py: unexpected indent
Script Error around line 13 - "anyUp=True"
Any ideas on how to fix?
Script Error CompanyCheck.Py: unexpected indent
Script Error around line 13 - "anyUp=True"
folder_id = 1637326348 # the ID of your default folder
variable_id = 936521597 # the ID of your tracking variable
anyUp = False
# Loop through Indigo devices
for dev in indigo.devices.itervalues():
# Is the device in the default folder?
if dev.folderId == folder_id:
try:
if dev.states['status'].lower() =='up':
#WhoComp = indigo.devices[lower()]
#CName = WhoComp.name
#indigo.variable.updateValue(117345824, CName)
indigo.variable.updateValue(variable_id, 'true')
anyUp=True
break
except:
pass
if not anyUp:
indigo.variable.updateValue(variable_id, 'false')
folder_id = 1637326348 # the ID of your default folder
variable_id = 936521597 # the ID of your tracking variable
anyUp = False
# Loop through Indigo devices
for dev in indigo.devices.itervalues():
# Is the device in the default folder?
if dev.folderId == folder_id:
try:
if dev.states['status'].lower() =='up':
whoIs = dev.name
dComp = whoIs.index('-')
firstCompany = whoIs(:dComp - 2)
indigo.variable.updateValue(117345824, firstCompany)
indigo.variable.updateValue(variable_id, 'true')
anyUp=True
break
except:
pass
if not anyUp:
indigo.variable.updateValue(variable_id, 'false')
whoIs[:dComp - 2]
whoIs = dev.name.split("-")[0][0:-2]
Users browsing this forum: No registered users and 5 guests