Skip to content

Commit

Permalink
Add support for STATE_AUTO of generic_thermostat (#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 awarecan committed Aug 1, 2018
1 parent 2ff5b4c commit 2e5131b
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 2e5131b

Please sign in to comment.