diff --git a/homeassistant/components/comelit/climate.py b/homeassistant/components/comelit/climate.py index be5b892e53c..e7890cddff8 100644 --- a/homeassistant/components/comelit/climate.py +++ b/homeassistant/components/comelit/climate.py @@ -134,11 +134,9 @@ class ComelitClimateEntity(ComelitBridgeBaseEntity, ClimateEntity): self._attr_current_temperature = values[0] / 10 self._attr_hvac_action = None - if _mode == ClimaComelitMode.OFF: - self._attr_hvac_action = HVACAction.OFF if not _active: self._attr_hvac_action = HVACAction.IDLE - if _mode in API_STATUS: + elif _mode in API_STATUS: self._attr_hvac_action = API_STATUS[_mode]["hvac_action"] self._attr_hvac_mode = None diff --git a/tests/components/comelit/snapshots/test_climate.ambr b/tests/components/comelit/snapshots/test_climate.ambr index e5201067ee1..0233359bc45 100644 --- a/tests/components/comelit/snapshots/test_climate.ambr +++ b/tests/components/comelit/snapshots/test_climate.ambr @@ -48,7 +48,7 @@ 'attributes': ReadOnlyDict({ 'current_temperature': 22.1, 'friendly_name': 'Climate0', - 'hvac_action': , + 'hvac_action': , 'hvac_modes': list([ , ,