Skip to content

Commit

Permalink
Add support for STATE_AUTO of generic_thermostat (home-assistant#15678)
Browse files Browse the repository at this point in the history
Add support for STATE_AUTO of generic_thermostat
  • Loading branch information
niklaswa authored and Jacob Mansfield committed Sep 4, 2018
1 parent 380d2fe commit abb7980
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion homeassistant/components/climate/generic_thermostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,14 @@ def operation_list(self):

async def async_set_operation_mode(self, operation_mode):
"""Set operation mode."""
if operation_mode == STATE_HEAT:
if operation_mode == STATE_AUTO:
if not self.ac_mode:
self._current_operation = STATE_HEAT
else:
self._current_operation = STATE_COOL
self._enabled = True
self._async_control_heating()
elif operation_mode == STATE_HEAT:
self._current_operation = STATE_HEAT
self._enabled = True
self._async_control_heating()
Expand Down

0 comments on commit abb7980

Please sign in to comment.