Skip to content

Commit b76ac68

Browse files
chemelli74frenck
authored andcommitted
Fix climate idle state for Comelit (home-assistant#145059)
1 parent 0691ad9 commit b76ac68

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

homeassistant/components/comelit/climate.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,9 @@ def _update_attributes(self) -> None:
134134
self._attr_current_temperature = values[0] / 10
135135

136136
self._attr_hvac_action = None
137-
if _mode == ClimaComelitMode.OFF:
138-
self._attr_hvac_action = HVACAction.OFF
139137
if not _active:
140138
self._attr_hvac_action = HVACAction.IDLE
141-
if _mode in API_STATUS:
139+
elif _mode in API_STATUS:
142140
self._attr_hvac_action = API_STATUS[_mode]["hvac_action"]
143141

144142
self._attr_hvac_mode = None

tests/components/comelit/snapshots/test_climate.ambr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
'attributes': ReadOnlyDict({
4949
'current_temperature': 22.1,
5050
'friendly_name': 'Climate0',
51-
'hvac_action': <HVACAction.HEATING: 'heating'>,
51+
'hvac_action': <HVACAction.IDLE: 'idle'>,
5252
'hvac_modes': list([
5353
<HVACMode.AUTO: 'auto'>,
5454
<HVACMode.COOL: 'cool'>,

0 commit comments

Comments
 (0)