Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,13 @@ def __init__(
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
Expand Down
4 changes: 3 additions & 1 deletion tests/components/zwave_js/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
13 changes: 5 additions & 8 deletions tests/components/zwave_js/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,27 +495,24 @@ async def test_poll_value(
assert args["valueId"] == {
"commandClassName": "Thermostat Mode",
"commandClass": 64,
"endpoint": 0,
"endpoint": 1,
"property": "mode",
"propertyName": "mode",
"metadata": {
"type": "number",
"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()
Expand All @@ -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):
Expand Down
Loading