Skip to content

Commit c6230d4

Browse files
authored
Merge pull request #7 from yutoyazaki/fix/unsupported_mode
Fix returning unsupported hvac modes caused api error
2 parents 98142ee + e050689 commit c6230d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

climate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ def hvac_mode(self):
136136
@property
137137
def hvac_modes(self):
138138
"""Return the list of available operation modes."""
139-
return list(MODE_HA_TO_REMO.keys())
139+
remo_modes = list(self._modes.keys())
140+
ha_modes = list(map(lambda mode: MODE_REMO_TO_HA[mode], remo_modes))
141+
ha_modes.append(HVAC_MODE_OFF)
142+
return ha_modes
140143

141144
@property
142145
def fan_mode(self):

0 commit comments

Comments
 (0)