From e9ea90dc82ea09de2cfbcf8fd97b9c8b0437c9d0 Mon Sep 17 00:00:00 2001 From: Harry Martland Date: Fri, 19 Jul 2024 12:47:28 +0100 Subject: [PATCH] Fix hive not updating when boosting (#122042) * fixes issue where hive does not update when boosting * formats files --- homeassistant/components/hive/climate.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/hive/climate.py b/homeassistant/components/hive/climate.py index cb1cc15a5bf..8f6db11babe 100644 --- a/homeassistant/components/hive/climate.py +++ b/homeassistant/components/hive/climate.py @@ -142,10 +142,10 @@ class HiveClimateEntity(HiveEntity, ClimateEntity): self.device = await self.hive.heating.getClimate(self.device) self._attr_available = self.device["deviceData"].get("online") if self._attr_available: - self._attr_hvac_mode = HIVE_TO_HASS_STATE[self.device["status"]["mode"]] - self._attr_hvac_action = HIVE_TO_HASS_HVAC_ACTION[ + self._attr_hvac_mode = HIVE_TO_HASS_STATE.get(self.device["status"]["mode"]) + self._attr_hvac_action = HIVE_TO_HASS_HVAC_ACTION.get( self.device["status"]["action"] - ] + ) self._attr_current_temperature = self.device["status"][ "current_temperature" ] @@ -154,5 +154,6 @@ class HiveClimateEntity(HiveEntity, ClimateEntity): self._attr_max_temp = self.device["max_temp"] if self.device["status"]["boost"] == "ON": self._attr_preset_mode = PRESET_BOOST + self._attr_hvac_mode = HVACMode.HEAT else: self._attr_preset_mode = PRESET_NONE