Closed rasmusbe closed 6 years ago
Interesting, I guess that was unexpected :-)
We could keep devices and sensors in separate namespaces of course, but as a sorts of quick-fix with less risk of regressions, maybe we can just prefix the id:s in the collect
method?
Can you please test and see if this change solves the issue with the sensor/device in your setup?
@molobrakos Thanks, just change line 312 to
self._state.update({'_' * is_sensor + str(device['id']): device
(converting device['id'] to string) and it works!
Ah, one more difference then between the two API:s - I only tested against the cloud service, and it returns the id:s as strings.
If you have a sensor witch sends both sensor data and is a binary sensor (which telldus handles as a device) the binary sensor/device gets overwritten when Session.update().
An example of this is with Aeotec Multisensor 6 which sends motion detection as a state. In the live API the sensor and the device has different ids, but not in the local api.
devices/list in local api:
sensors/list in local api: