Change 'on' to 'heat' as fallback thermostat mode ()

* Change 'on' to 'heat' as fallback thermostat mode

'on' isn't recognised as a mode by Google Assistant, rather is used as a method to return a thermostat to a previous mode. In the case where a thermostat doesn't support the standard google modes (e.g. A homematic radiator thermostat) this means the set_temperature doesn't get returned to the user on a request.

* Update test_google_assistant.py
This commit is contained in:
andrewdolphin 2018-01-21 20:57:56 +00:00 committed by Paulus Schoutsen
parent 6a6ea263cf
commit 5513ffc33c
2 changed files with 3 additions and 3 deletions
homeassistant/components/google_assistant
tests/components/google_assistant

View file

@ -151,7 +151,7 @@ def query_device(entity: Entity, units: UnitSystem) -> dict:
if entity.domain == climate.DOMAIN:
mode = entity.attributes.get(climate.ATTR_OPERATION_MODE).lower()
if mode not in CLIMATE_SUPPORTED_MODES:
mode = 'on'
mode = 'heat'
response = {
'thermostatMode': mode,
'thermostatTemperatureSetpoint':

View file

@ -215,7 +215,7 @@ def test_query_climate_request(hass_fixture, assistant_client):
'climate.ecobee': {
'thermostatTemperatureSetpointHigh': 24,
'thermostatTemperatureAmbient': 23,
'thermostatMode': 'on',
'thermostatMode': 'heat',
'thermostatTemperatureSetpointLow': 21
},
'climate.hvac': {
@ -263,7 +263,7 @@ def test_query_climate_request_f(hass_fixture, assistant_client):
'climate.ecobee': {
'thermostatTemperatureSetpointHigh': -4.4,
'thermostatTemperatureAmbient': -5,
'thermostatMode': 'on',
'thermostatMode': 'heat',
'thermostatTemperatureSetpointLow': -6.1,
},
'climate.hvac': {