Check all endpoints for zwave_js.climate fan mode and operating state (#48800)
* Check all endpoints for zwave_js.climate fan mode and operating state * fix testpull/48865/head
parent
f1c4072d3c
commit
2768f202b6
|
@ -169,11 +169,13 @@ class ZWaveClimate(ZWaveBaseEntity, ClimateEntity):
|
|||
THERMOSTAT_MODE_PROPERTY,
|
||||
CommandClass.THERMOSTAT_FAN_MODE,
|
||||
add_to_watched_value_ids=True,
|
||||
check_all_endpoints=True,
|
||||
)
|
||||
self._fan_state = self.get_zwave_value(
|
||||
THERMOSTAT_OPERATING_STATE_PROPERTY,
|
||||
CommandClass.THERMOSTAT_FAN_STATE,
|
||||
add_to_watched_value_ids=True,
|
||||
check_all_endpoints=True,
|
||||
)
|
||||
self._set_modes_and_presets()
|
||||
self._supported_features = 0
|
||||
|
|
|
@ -348,7 +348,9 @@ async def test_thermostat_different_endpoints(
|
|||
"""Test an entity with values on a different endpoint from the primary value."""
|
||||
state = hass.states.get(CLIMATE_RADIO_THERMOSTAT_ENTITY)
|
||||
|
||||
assert state.attributes[ATTR_CURRENT_TEMPERATURE] == 22.5
|
||||
assert state.attributes[ATTR_CURRENT_TEMPERATURE] == 22.8
|
||||
assert state.attributes[ATTR_FAN_MODE] == "Auto low"
|
||||
assert state.attributes[ATTR_FAN_STATE] == "Idle / off"
|
||||
|
||||
|
||||
async def test_setpoint_thermostat(hass, client, climate_danfoss_lc_13, integration):
|
||||
|
|
|
@ -495,7 +495,7 @@ async def test_poll_value(
|
|||
assert args["valueId"] == {
|
||||
"commandClassName": "Thermostat Mode",
|
||||
"commandClass": 64,
|
||||
"endpoint": 0,
|
||||
"endpoint": 1,
|
||||
"property": "mode",
|
||||
"propertyName": "mode",
|
||||
"metadata": {
|
||||
|
@ -503,19 +503,16 @@ async def test_poll_value(
|
|||
"readable": True,
|
||||
"writeable": True,
|
||||
"min": 0,
|
||||
"max": 31,
|
||||
"max": 255,
|
||||
"label": "Thermostat mode",
|
||||
"states": {
|
||||
"0": "Off",
|
||||
"1": "Heat",
|
||||
"2": "Cool",
|
||||
"3": "Auto",
|
||||
"11": "Energy heat",
|
||||
"12": "Energy cool",
|
||||
},
|
||||
},
|
||||
"value": 1,
|
||||
"ccVersion": 2,
|
||||
"value": 2,
|
||||
"ccVersion": 0,
|
||||
}
|
||||
|
||||
client.async_send_command.reset_mock()
|
||||
|
@ -531,7 +528,7 @@ async def test_poll_value(
|
|||
},
|
||||
blocking=True,
|
||||
)
|
||||
assert len(client.async_send_command.call_args_list) == 8
|
||||
assert len(client.async_send_command.call_args_list) == 7
|
||||
|
||||
# Test polling against an invalid entity raises ValueError
|
||||
with pytest.raises(ValueError):
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue