Fix paste error in homekit climate update (#123943)

This commit is contained in:
J. Nick Koston 2024-08-14 11:00:11 -05:00 committed by GitHub
parent 3e967700fd
commit 9b33d2f17e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)