From 7deebf881732bf817cdcc21969fc26131a709aa5 Mon Sep 17 00:00:00 2001 From: David Bonnes Date: Tue, 16 Jan 2024 12:45:24 +0000 Subject: [PATCH] Handle renaming of evohome zones (#108089) --- homeassistant/components/evohome/climate.py | 7 +++++-- homeassistant/components/evohome/water_heater.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/evohome/climate.py b/homeassistant/components/evohome/climate.py index 97a126e2660e..a1c46f3d331a 100644 --- a/homeassistant/components/evohome/climate.py +++ b/homeassistant/components/evohome/climate.py @@ -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.""" diff --git a/homeassistant/components/evohome/water_heater.py b/homeassistant/components/evohome/water_heater.py index 77a7b1c2ced4..26a60f9ec088 100644 --- a/homeassistant/components/evohome/water_heater.py +++ b/homeassistant/components/evohome/water_heater.py @@ -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