mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 15:27:08 +00:00
Revert "Use shorthand attributes in Telldus live" (#101281)
This commit is contained in:
parent
1a9c98e837
commit
6fa3078cfc
@ -142,7 +142,6 @@ class TelldusLiveSensor(TelldusLiveEntity, SensorEntity):
|
|||||||
def __init__(self, client, device_id):
|
def __init__(self, client, device_id):
|
||||||
"""Initialize TelldusLiveSensor."""
|
"""Initialize TelldusLiveSensor."""
|
||||||
super().__init__(client, device_id)
|
super().__init__(client, device_id)
|
||||||
self._attr_unique_id = "{}-{}-{}".format(*device_id)
|
|
||||||
if desc := SENSOR_TYPES.get(self._type):
|
if desc := SENSOR_TYPES.get(self._type):
|
||||||
self.entity_description = desc
|
self.entity_description = desc
|
||||||
else:
|
else:
|
||||||
@ -190,3 +189,8 @@ class TelldusLiveSensor(TelldusLiveEntity, SensorEntity):
|
|||||||
if self._type == SENSOR_TYPE_LUMINANCE:
|
if self._type == SENSOR_TYPE_LUMINANCE:
|
||||||
return self._value_as_luminance
|
return self._value_as_luminance
|
||||||
return self._value
|
return self._value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unique_id(self) -> str:
|
||||||
|
"""Return a unique ID."""
|
||||||
|
return "{}-{}-{}".format(*self._id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user