mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Change 'on' to 'heat' as fallback thermostat mode (#11377)
* 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:
parent
6a6ea263cf
commit
5513ffc33c
@ -151,7 +151,7 @@ def query_device(entity: Entity, units: UnitSystem) -> dict:
|
|||||||
if entity.domain == climate.DOMAIN:
|
if entity.domain == climate.DOMAIN:
|
||||||
mode = entity.attributes.get(climate.ATTR_OPERATION_MODE).lower()
|
mode = entity.attributes.get(climate.ATTR_OPERATION_MODE).lower()
|
||||||
if mode not in CLIMATE_SUPPORTED_MODES:
|
if mode not in CLIMATE_SUPPORTED_MODES:
|
||||||
mode = 'on'
|
mode = 'heat'
|
||||||
response = {
|
response = {
|
||||||
'thermostatMode': mode,
|
'thermostatMode': mode,
|
||||||
'thermostatTemperatureSetpoint':
|
'thermostatTemperatureSetpoint':
|
||||||
|
@ -215,7 +215,7 @@ def test_query_climate_request(hass_fixture, assistant_client):
|
|||||||
'climate.ecobee': {
|
'climate.ecobee': {
|
||||||
'thermostatTemperatureSetpointHigh': 24,
|
'thermostatTemperatureSetpointHigh': 24,
|
||||||
'thermostatTemperatureAmbient': 23,
|
'thermostatTemperatureAmbient': 23,
|
||||||
'thermostatMode': 'on',
|
'thermostatMode': 'heat',
|
||||||
'thermostatTemperatureSetpointLow': 21
|
'thermostatTemperatureSetpointLow': 21
|
||||||
},
|
},
|
||||||
'climate.hvac': {
|
'climate.hvac': {
|
||||||
@ -263,7 +263,7 @@ def test_query_climate_request_f(hass_fixture, assistant_client):
|
|||||||
'climate.ecobee': {
|
'climate.ecobee': {
|
||||||
'thermostatTemperatureSetpointHigh': -4.4,
|
'thermostatTemperatureSetpointHigh': -4.4,
|
||||||
'thermostatTemperatureAmbient': -5,
|
'thermostatTemperatureAmbient': -5,
|
||||||
'thermostatMode': 'on',
|
'thermostatMode': 'heat',
|
||||||
'thermostatTemperatureSetpointLow': -6.1,
|
'thermostatTemperatureSetpointLow': -6.1,
|
||||||
},
|
},
|
||||||
'climate.hvac': {
|
'climate.hvac': {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user