From dbb771e19cc78d0c34b455c354461bb0046004dc Mon Sep 17 00:00:00 2001 From: jjlawren Date: Mon, 12 Apr 2021 11:29:45 -0500 Subject: [PATCH] Check all endpoints for zwave_js.climate hvac_action (#49115) --- homeassistant/components/zwave_js/climate.py | 1 + tests/components/zwave_js/test_climate.py | 2 ++ tests/components/zwave_js/test_services.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/zwave_js/climate.py b/homeassistant/components/zwave_js/climate.py index c64a5ef788f..41ea873c5f8 100644 --- a/homeassistant/components/zwave_js/climate.py +++ b/homeassistant/components/zwave_js/climate.py @@ -150,6 +150,7 @@ class ZWaveClimate(ZWaveBaseEntity, ClimateEntity): THERMOSTAT_OPERATING_STATE_PROPERTY, command_class=CommandClass.THERMOSTAT_OPERATING_STATE, add_to_watched_value_ids=True, + check_all_endpoints=True, ) self._current_temp = self.get_zwave_value( THERMOSTAT_CURRENT_TEMP_PROPERTY, diff --git a/tests/components/zwave_js/test_climate.py b/tests/components/zwave_js/test_climate.py index 83a607f3add..2084e771546 100644 --- a/tests/components/zwave_js/test_climate.py +++ b/tests/components/zwave_js/test_climate.py @@ -12,6 +12,7 @@ from homeassistant.components.climate.const import ( ATTR_PRESET_MODE, ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, + CURRENT_HVAC_COOL, CURRENT_HVAC_IDLE, DOMAIN as CLIMATE_DOMAIN, HVAC_MODE_COOL, @@ -351,6 +352,7 @@ async def test_thermostat_different_endpoints( assert state.attributes[ATTR_CURRENT_TEMPERATURE] == 22.8 assert state.attributes[ATTR_FAN_MODE] == "Auto low" assert state.attributes[ATTR_FAN_STATE] == "Idle / off" + assert state.attributes[ATTR_HVAC_ACTION] == CURRENT_HVAC_COOL async def test_setpoint_thermostat(hass, client, climate_danfoss_lc_13, integration): diff --git a/tests/components/zwave_js/test_services.py b/tests/components/zwave_js/test_services.py index 7bdba7894d2..956361d3953 100644 --- a/tests/components/zwave_js/test_services.py +++ b/tests/components/zwave_js/test_services.py @@ -528,7 +528,7 @@ async def test_poll_value( }, blocking=True, ) - assert len(client.async_send_command.call_args_list) == 7 + assert len(client.async_send_command.call_args_list) == 8 # Test polling against an invalid entity raises ValueError with pytest.raises(ValueError):