From 2f2b5ab3de2ac004166fc7ac43e0b61c2d7358ac Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Mon, 22 Apr 2024 16:27:26 +0100 Subject: [PATCH] Fix preheating icon --- custom_components/hive_local_thermostat/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/hive_local_thermostat/sensor.py b/custom_components/hive_local_thermostat/sensor.py index 69fb0f1..4b52309 100644 --- a/custom_components/hive_local_thermostat/sensor.py +++ b/custom_components/hive_local_thermostat/sensor.py @@ -130,9 +130,9 @@ def process_update(self, mqtt_data) -> None: new_value = "" if self.entity_description.running_state: - self._attr_icon = self.entity_description.icons_by_state.get(new_value, ICON_UNKNOWN) if new_value == "": new_value = "preheating" + self._attr_icon = self.entity_description.icons_by_state.get(new_value, ICON_UNKNOWN) if self.entity_description.device_class == SensorDeviceClass.TEMPERATURE: new_value = show_temp(self.hass, new_value, self.entity_description.native_unit_of_measurement, PRECISION_TENTHS)