Handle renaming of evohome zones (#108089)

This commit is contained in:
David Bonnes 2024-01-16 12:45:24 +00:00 committed by GitHub
parent d4739cfa5c
commit 7deebf8817
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -182,8 +182,6 @@ class EvoZone(EvoChild, EvoClimateEntity):
else:
self._attr_unique_id = evo_device.zoneId
self._attr_name = evo_device.name
if evo_broker.client_v1:
self._attr_precision = PRECISION_TENTHS
else:
@ -219,6 +217,11 @@ class EvoZone(EvoChild, EvoClimateEntity):
self._evo_device.set_temperature(temperature, until=until)
)
@property
def name(self) -> str | None:
"""Return the name of the evohome entity."""
return self._evo_device.name # zones can be easily renamed
@property
def hvac_mode(self) -> HVACMode | None:
"""Return the current operating mode of a Zone."""

View file

@ -89,6 +89,7 @@ class EvoDHW(EvoChild, WaterHeaterEntity):
self._evo_id = evo_device.dhwId
self._attr_unique_id = evo_device.dhwId
self._attr_name = evo_device.name # is static
self._attr_precision = (
PRECISION_TENTHS if evo_broker.client_v1 else PRECISION_WHOLE