Add unique_id for tellduslive (#18744)

This commit is contained in:
Fredrik Erlandsson authored and Paulus Schoutsen committed 2018-11-27 15:35:51 +01:00
1 parent 392898e694
commit eb2e2a116e
2 files changed
+12 -3

No files matched your search

@@ -127,3 +127,8 @@ class TelldusLiveSensor(TelldusLiveEntity):
"""Return the device class."""
return SENSOR_TYPES[self._type][3] \
if self._type in SENSOR_TYPES else None
@property
def unique_id(self) -> str:
"""Return a unique ID."""
return "-".join(self._id[0:2])