Fix Aseko binary sensors names (#116251)

* Fix Aseko binary sensors names

* Fix add missing key to strings.json

* Fix remove setting shorthand translation key attribute

* Update homeassistant/components/aseko_pool_live/strings.json

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
hopkins-tk 2024-04-27 10:02:52 +02:00 committed by Paulus Schoutsen
parent 2c46db16d4
commit abf45a0e0c

View File

@ -42,6 +42,7 @@ UNIT_BINARY_SENSORS: tuple[AsekoBinarySensorEntityDescription, ...] = (
),
AsekoBinarySensorEntityDescription(
key="has_error",
translation_key="error",
value_fn=lambda unit: unit.has_error,
device_class=BinarySensorDeviceClass.PROBLEM,
),
@ -78,7 +79,6 @@ class AsekoUnitBinarySensorEntity(AsekoEntity, BinarySensorEntity):
"""Initialize the unit binary sensor."""
super().__init__(unit, coordinator)
self.entity_description = entity_description
self._attr_name = f"{self._device_name} {entity_description.name}"
self._attr_unique_id = f"{self._unit.serial_number}_{entity_description.key}"
@property