Just spent half an hour wondering why my code as follows wasn't adding a newly defined state to my existing devices:
- Code: Select all
for dev in indigo.devices.iter("self"):
dev.stateListOrDisplayStateIdChanged()
It seems if you incorrectly define the state ValueType as 'Int' then Indigo completely skips over the new state when parsing the xml, instead of reporting an error that the XML is using an invalid tag value.
The docs (http://wiki.indigodomo.com/doku.php?id= ... devicesxml) indicate it should be 'Number' but actually Float works for my other states which ARE float values, whereas this value is only an integer so I presumed Int would work.
Something for fixing in future release?
Peter