indigo.device.getGroupList
Posted: Sun Dec 10, 2017 6:06 pm
I feel like I'm either confused about this device call or it is not working.
Here is my code:
and the log output:
There are 7 different items selected within this group so I should get the output of:
what am I missing?
Here is my code:
- Code: Select all
groupSecurity = indigo.device.getGroupList(1912245) # "Security Walk Devices"
# toggle a random device
indigo.server.log(str(len(groupSecurity)))
dev = randint(0,len(groupSecurity)-1)
indigo.server.log(str(dev))
devNumber = groupSecurity[dev]
indigo.server.log(str(devNumber))
and the log output:
- Code: Select all
Script 1
Script 0
Script 1912245
There are 7 different items selected within this group so I should get the output of:
- Code: Select all
7
a random number between 0 and 6
the actual ID of the item within the group, not the ID of the group itself
what am I missing?