Fallback to current temperature unit for zwave_js climate (#48347)

* Fallback to current temperature unit for zwave_js climate

* don't use unit for N/A setpoint

* update comment

* add tests
This commit is contained in:
Raman Gupta 2021-03-28 16:18:17 -04:00 committed by GitHub
parent 2ff94c8ed9
commit 08db248983
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1873 additions and 2 deletions

View file

@ -578,3 +578,20 @@ async def test_preset_and_no_setpoint(
assert args["value"] == 1
client.async_send_command.reset_mock()
async def test_temp_unit_fix(
hass,
client,
climate_radio_thermostat_ct101_multiple_temp_units,
climate_radio_thermostat_ct100_mode_and_setpoint_on_different_endpoints,
integration,
):
"""Test temperaturee unit fix."""
state = hass.states.get("climate.thermostat")
assert state
assert state.attributes["current_temperature"] == 18.3
state = hass.states.get("climate.z_wave_thermostat")
assert state
assert state.attributes["current_temperature"] == 21.1