From 9b33d2f17ee688d3468462bc9e98f8e9634b4440 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 14 Aug 2024 11:00:11 -0500 Subject: [PATCH] Fix paste error in homekit climate update (#123943) --- homeassistant/components/homekit/type_thermostats.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/homekit/type_thermostats.py b/homeassistant/components/homekit/type_thermostats.py index a97f26b7abb..91bab2d470a 100644 --- a/homeassistant/components/homekit/type_thermostats.py +++ b/homeassistant/components/homekit/type_thermostats.py @@ -625,11 +625,10 @@ class Thermostat(HomeAccessory): ) # Set current operation mode for supported thermostats - if (hvac_action := attributes.get(ATTR_HVAC_ACTION)) and ( - homekit_hvac_action := HC_HASS_TO_HOMEKIT_ACTION.get(hvac_action), - HC_HEAT_COOL_OFF, - ): - self.char_current_heat_cool.set_value(homekit_hvac_action) + if hvac_action := attributes.get(ATTR_HVAC_ACTION): + self.char_current_heat_cool.set_value( + HC_HASS_TO_HOMEKIT_ACTION.get(hvac_action, HC_HEAT_COOL_OFF) + ) # Update current temperature current_temp = _get_current_temperature(new_state, self._unit)