The old method signatures were:
- Code: Select all
def getDeviceStateList(self, typeId, devId):
...
def getDeviceDisplayStateId(self, typeId, devId):
...
The new method signature removes the typeId and devId arguments and instead passes a full indigo.Device instance object. This is useful for plugins that want full access to the device's properties to dynamically calculate the state list (or display state ID). For compatibility with the new version you can change your method definition and add the following 2 lines to set the previous argument values.
- Code: Select all
def getDeviceStateList(self, dev):
typeId = dev.deviceTypeId
devId = dev.id
...
def getDeviceDisplayStateId(self, dev):
typeId = dev.deviceTypeId
devId = dev.id
...
Note that we do our best to not make these types of incompatible API changes, but since Indigo is still in beta and I believe there are only a couple of plugins that might be effected we opted not to try to maintain the old method signature in this case.