- Code: Select all
dev = indigo.devices[123456789] # GhostXML device
state_1 = dev.states['list_0_rain_3h']
Attr_1 = 'list_0_rain_3h'
if hasattr(dev, Attr_1):
indigo.server.log("state = %s" % (dev. list_0_rain_3h))
else:
state_1 = 0
indigo.server.log("hassattr1 = attr not found")