mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Fix Google Assistant temperature attribute (#85921)
This commit is contained in:
parent
6c73b9024b
commit
89aebba3ab
@ -832,7 +832,7 @@ class TemperatureControlTrait(_Trait):
|
|||||||
"temperatureUnitForUX": _google_temp_unit(
|
"temperatureUnitForUX": _google_temp_unit(
|
||||||
self.hass.config.units.temperature_unit
|
self.hass.config.units.temperature_unit
|
||||||
),
|
),
|
||||||
"queryOnlyTemperatureSetting": True,
|
"queryOnlyTemperatureControl": True,
|
||||||
"temperatureRange": {
|
"temperatureRange": {
|
||||||
"minThresholdCelsius": -100,
|
"minThresholdCelsius": -100,
|
||||||
"maxThresholdCelsius": 100,
|
"maxThresholdCelsius": 100,
|
||||||
|
@ -1101,7 +1101,7 @@ async def test_temperature_control(hass: HomeAssistant) -> None:
|
|||||||
BASIC_CONFIG,
|
BASIC_CONFIG,
|
||||||
)
|
)
|
||||||
assert trt.sync_attributes() == {
|
assert trt.sync_attributes() == {
|
||||||
"queryOnlyTemperatureSetting": True,
|
"queryOnlyTemperatureControl": True,
|
||||||
"temperatureUnitForUX": "C",
|
"temperatureUnitForUX": "C",
|
||||||
"temperatureRange": {"maxThresholdCelsius": 100, "minThresholdCelsius": -100},
|
"temperatureRange": {"maxThresholdCelsius": 100, "minThresholdCelsius": -100},
|
||||||
}
|
}
|
||||||
@ -2941,7 +2941,7 @@ async def test_temperature_control_sensor_data(
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert trt.sync_attributes() == {
|
assert trt.sync_attributes() == {
|
||||||
"queryOnlyTemperatureSetting": True,
|
"queryOnlyTemperatureControl": True,
|
||||||
"temperatureUnitForUX": unit_out,
|
"temperatureUnitForUX": unit_out,
|
||||||
"temperatureRange": {"maxThresholdCelsius": 100, "minThresholdCelsius": -100},
|
"temperatureRange": {"maxThresholdCelsius": 100, "minThresholdCelsius": -100},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user