diff --git a/homeassistant/components/evohome/manifest.json b/homeassistant/components/evohome/manifest.json index ead9c75bb15..28950397a04 100644 --- a/homeassistant/components/evohome/manifest.json +++ b/homeassistant/components/evohome/manifest.json @@ -6,5 +6,5 @@ "iot_class": "cloud_polling", "loggers": ["evohomeasync", "evohomeasync2"], "quality_scale": "legacy", - "requirements": ["evohome-async==1.1.3"] + "requirements": ["evohome-async==1.2.0"] } diff --git a/homeassistant/components/evohome/water_heater.py b/homeassistant/components/evohome/water_heater.py index f6b6725b431..4da5a826690 100644 --- a/homeassistant/components/evohome/water_heater.py +++ b/homeassistant/components/evohome/water_heater.py @@ -124,15 +124,17 @@ class EvoDHW(EvoChild, WaterHeaterEntity): until = dt_util.as_utc(until) if until else None if operation_mode == STATE_ON: - await self.coordinator.call_client_api(self._evo_device.on(until=until)) + await self.coordinator.call_client_api( + self._evo_device.set_on(until=until) + ) else: # STATE_OFF await self.coordinator.call_client_api( - self._evo_device.off(until=until) + self._evo_device.set_off(until=until) ) async def async_turn_away_mode_on(self) -> None: """Turn away mode on.""" - await self.coordinator.call_client_api(self._evo_device.off()) + await self.coordinator.call_client_api(self._evo_device.set_off()) async def async_turn_away_mode_off(self) -> None: """Turn away mode off.""" @@ -140,8 +142,8 @@ class EvoDHW(EvoChild, WaterHeaterEntity): async def async_turn_on(self, **kwargs: Any) -> None: """Turn on.""" - await self.coordinator.call_client_api(self._evo_device.on()) + await self.coordinator.call_client_api(self._evo_device.set_on()) async def async_turn_off(self, **kwargs: Any) -> None: """Turn off.""" - await self.coordinator.call_client_api(self._evo_device.off()) + await self.coordinator.call_client_api(self._evo_device.set_off()) diff --git a/requirements_all.txt b/requirements_all.txt index 1007a6bf15b..844c0e6bbfe 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -945,7 +945,7 @@ eufylife-ble-client==0.1.8 # evdev==1.9.3 # homeassistant.components.evohome -evohome-async==1.1.3 +evohome-async==1.2.0 # homeassistant.components.bryant_evolution evolutionhttp==0.0.18 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 51638bb55d6..464e5c71397 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -833,7 +833,7 @@ eternalegypt==0.0.18 eufylife-ble-client==0.1.8 # homeassistant.components.evohome -evohome-async==1.1.3 +evohome-async==1.2.0 # homeassistant.components.bryant_evolution evolutionhttp==0.0.18 diff --git a/tests/components/evohome/test_init.py b/tests/components/evohome/test_init.py index 1a1d349b07c..d3027ba7a9a 100644 --- a/tests/components/evohome/test_init.py +++ b/tests/components/evohome/test_init.py @@ -49,13 +49,13 @@ LOG_FAIL_GATEWAY = ( "homeassistant.components.evohome", logging.ERROR, "Failed to fetch initial data: " - "Authenticator response is invalid: 502 Bad Gateway, response=None", + "Authenticator response is invalid: 502 Bad Gateway, response=", ) LOG_FAIL_TOO_MANY = ( "homeassistant.components.evohome", logging.ERROR, "Failed to fetch initial data: " - "Authenticator response is invalid: 429 Too Many Requests, response=None", + "Authenticator response is invalid: 429 Too Many Requests, response=", ) LOG_FGET_CONNECTION = ( @@ -70,14 +70,14 @@ LOG_FGET_GATEWAY = ( logging.ERROR, "Failed to fetch initial data: " "GET https://tccna.resideo.com/WebAPI/emea/api/v1/userAccount: " - "502 Bad Gateway, response=None", + "502 Bad Gateway", ) LOG_FGET_TOO_MANY = ( "homeassistant.components.evohome", logging.ERROR, "Failed to fetch initial data: " "GET https://tccna.resideo.com/WebAPI/emea/api/v1/userAccount: " - "429 Too Many Requests, response=None", + "429 Too Many Requests", ) diff --git a/tests/components/evohome/test_water_heater.py b/tests/components/evohome/test_water_heater.py index ce52f43db35..56d57db0cae 100644 --- a/tests/components/evohome/test_water_heater.py +++ b/tests/components/evohome/test_water_heater.py @@ -76,7 +76,7 @@ async def test_set_operation_mode( mock_fcn.assert_awaited_once_with() # SERVICE_SET_OPERATION_MODE: off (until next scheduled setpoint) - with patch("evohomeasync2.hotwater.HotWater.off") as mock_fcn: + with patch("evohomeasync2.hotwater.HotWater.set_off") as mock_fcn: await hass.services.async_call( WATER_HEATER_DOMAIN, SERVICE_SET_OPERATION_MODE, @@ -96,7 +96,7 @@ async def test_set_operation_mode( results.append(mock_fcn.await_args.kwargs) # SERVICE_SET_OPERATION_MODE: on (until next scheduled setpoint) - with patch("evohomeasync2.hotwater.HotWater.on") as mock_fcn: + with patch("evohomeasync2.hotwater.HotWater.set_on") as mock_fcn: await hass.services.async_call( WATER_HEATER_DOMAIN, SERVICE_SET_OPERATION_MODE, @@ -137,7 +137,7 @@ async def test_set_away_mode(hass: HomeAssistant, evohome: EvohomeClient) -> Non mock_fcn.assert_awaited_once_with() # set_away_mode: on - with patch("evohomeasync2.hotwater.HotWater.off") as mock_fcn: + with patch("evohomeasync2.hotwater.HotWater.set_off") as mock_fcn: await hass.services.async_call( WATER_HEATER_DOMAIN, SERVICE_SET_AWAY_MODE, @@ -156,7 +156,7 @@ async def test_turn_off(hass: HomeAssistant, evohome: EvohomeClient) -> None: """Test SERVICE_TURN_OFF of an evohome DHW zone.""" # turn_off - with patch("evohomeasync2.hotwater.HotWater.off") as mock_fcn: + with patch("evohomeasync2.hotwater.HotWater.set_off") as mock_fcn: await hass.services.async_call( WATER_HEATER_DOMAIN, SERVICE_TURN_OFF, @@ -174,7 +174,7 @@ async def test_turn_on(hass: HomeAssistant, evohome: EvohomeClient) -> None: """Test SERVICE_TURN_ON of an evohome DHW zone.""" # turn_on - with patch("evohomeasync2.hotwater.HotWater.on") as mock_fcn: + with patch("evohomeasync2.hotwater.HotWater.set_on") as mock_fcn: await hass.services.async_call( WATER_HEATER_DOMAIN, SERVICE_TURN_ON,