Fix ondilo_ico name attribute (#54290)
This commit is contained in:
parent
74d41ac5e5
commit
511af66b22
1 changed files with 2 additions and 7 deletions
|
@ -141,9 +141,9 @@ class OndiloICO(CoordinatorEntity, SensorEntity):
|
|||
self._poolid = self.coordinator.data[poolidx]["id"]
|
||||
|
||||
pooldata = self._pooldata()
|
||||
self._unique_id = f"{pooldata['ICO']['serial_number']}-{description.key}"
|
||||
self._attr_unique_id = f"{pooldata['ICO']['serial_number']}-{description.key}"
|
||||
self._device_name = pooldata["name"]
|
||||
self._name = f"{self._device_name} {description.name}"
|
||||
self._attr_name = f"{self._device_name} {description.name}"
|
||||
|
||||
def _pooldata(self):
|
||||
"""Get pool data dict."""
|
||||
|
@ -168,11 +168,6 @@ class OndiloICO(CoordinatorEntity, SensorEntity):
|
|||
"""Last value of the sensor."""
|
||||
return self._devdata()["value"]
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return the unique ID of this entity."""
|
||||
return self._unique_id
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
"""Return the device info for the sensor."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue