- Code: Select all
def getDeviceDisplayStateId(self, dev):
if dev.deviceTypeId == "phStandalonePhidget" and dev.pluginProps['phStandalonePhidgetModel'] == '1054':
indigo.server.log("old stateId is:%s" % self.devicesTypeDict[dev.deviceTypeId][u'DisplayStateId'], type=self.pluginDisplayName)
self.devicesTypeDict[dev.deviceTypeId][u'DisplayStateId'] = 'kwh'
indigo.server.log("new stateId is:%s" % self.devicesTypeDict[dev.deviceTypeId][u'DisplayStateId'], type=self.pluginDisplayName
return self.devicesTypeDict[dev.deviceTypeId][u'DisplayStateId'])
Unfortunately, this does not work. Here is the log entry...
Opened the device
- Phidgets old stateId is:onOffState
Phidgets new stateId is:onOffState
- Phidgets old stateId is:onOffState
Phidgets new stateId is:onOffState
What am I doing wrong/not doing?