Fix Google Assistant temperature attribute (#85921)

This commit is contained in:
Frédéric Guardia 2023-03-01 12:54:07 +01:00 committed by Franck Nijhof
parent 6c73b9024b
commit 89aebba3ab
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 3 additions and 3 deletions

View File

@ -832,7 +832,7 @@ class TemperatureControlTrait(_Trait):
"temperatureUnitForUX": _google_temp_unit(
self.hass.config.units.temperature_unit
),
"queryOnlyTemperatureSetting": True,
"queryOnlyTemperatureControl": True,
"temperatureRange": {
"minThresholdCelsius": -100,
"maxThresholdCelsius": 100,

View File

@ -1101,7 +1101,7 @@ async def test_temperature_control(hass: HomeAssistant) -> None:
BASIC_CONFIG,
)
assert trt.sync_attributes() == {
"queryOnlyTemperatureSetting": True,
"queryOnlyTemperatureControl": True,
"temperatureUnitForUX": "C",
"temperatureRange": {"maxThresholdCelsius": 100, "minThresholdCelsius": -100},
}
@ -2941,7 +2941,7 @@ async def test_temperature_control_sensor_data(
)
assert trt.sync_attributes() == {
"queryOnlyTemperatureSetting": True,
"queryOnlyTemperatureControl": True,
"temperatureUnitForUX": unit_out,
"temperatureRange": {"maxThresholdCelsius": 100, "minThresholdCelsius": -100},
}