Closed GeoffAtHome closed 11 months ago
Currently sensors such as battery levels just reflect the id of the device. If this included the zone name it would make it more useful.
In sensor.py
I suggest the code is changed from:
class GeniusBattery(GeniusDevice, SensorEntity): """Representation of a Genius Hub sensor.""" def __init__(self, broker, device, state_attr) -> None: """Initialize the sensor.""" super().__init__(broker, device) self._state_attr = state_attr self._attr_name = f"{device.type} {device.id}"
to:
class GeniusBattery(GeniusDevice, SensorEntity): """Representation of a Genius Hub sensor.""" def __init__(self, broker, device, state_attr) -> None: """Initialize the sensor.""" super().__init__(broker, device) self._state_attr = state_attr self._attr_name = f"{device.type} ({device.id}) in {device.assigned_zone.name}"
from
Added to home assistant core.
Currently sensors such as battery levels just reflect the id of the device. If this included the zone name it would make it more useful.
In sensor.py
I suggest the code is changed from:
to:
from