@@ -39,7 +39,7 @@ async def test_set_operation_mode(
3939 freezer : FrozenDateTimeFactory ,
4040 snapshot : SnapshotAssertion ,
4141) -> None :
42- """Test SERVICE_SET_OPERATION_MODE of a evohome HotWater entity ."""
42+ """Test SERVICE_SET_OPERATION_MODE of an evohome DHW zone ."""
4343
4444 freezer .move_to ("2024-07-10T11:55:00Z" )
4545 results = []
@@ -74,7 +74,9 @@ async def test_set_operation_mode(
7474
7575 assert mock_fcn .await_count == 1
7676 assert mock_fcn .await_args .args == ()
77- results .append (mock_fcn .await_args .args )
77+ assert mock_fcn .await_args .kwargs != {}
78+
79+ results .append (mock_fcn .await_args .kwargs )
7880
7981 # SERVICE_SET_OPERATION_MODE: on (until next scheduled setpoint)
8082 with patch ("evohomeasync2.hotwater.HotWater.set_on" ) as mock_fcn :
@@ -90,14 +92,16 @@ async def test_set_operation_mode(
9092
9193 assert mock_fcn .await_count == 1
9294 assert mock_fcn .await_args .args == ()
93- results .append (mock_fcn .await_args .args )
95+ assert mock_fcn .await_args .kwargs != {}
96+
97+ results .append (mock_fcn .await_args .kwargs )
9498
9599 assert results == snapshot
96100
97101
98102@pytest .mark .parametrize ("install" , TEST_INSTALLS_WITH_DHW )
99103async def test_set_away_mode (hass : HomeAssistant , evohome : EvohomeClient ) -> None :
100- """Test SERVICE_SET_AWAY_MODE of a evohome HotWater entity ."""
104+ """Test SERVICE_SET_AWAY_MODE of an evohome DHW zone ."""
101105
102106 # set_away_mode: off
103107 with patch ("evohomeasync2.hotwater.HotWater.reset_mode" ) as mock_fcn :
@@ -115,7 +119,7 @@ async def test_set_away_mode(hass: HomeAssistant, evohome: EvohomeClient) -> Non
115119 assert mock_fcn .await_args .args == ()
116120 assert mock_fcn .await_args .kwargs == {}
117121
118- # set_away_mode: off
122+ # set_away_mode: on
119123 with patch ("evohomeasync2.hotwater.HotWater.set_off" ) as mock_fcn :
120124 await hass .services .async_call (
121125 Platform .WATER_HEATER ,
@@ -134,9 +138,9 @@ async def test_set_away_mode(hass: HomeAssistant, evohome: EvohomeClient) -> Non
134138
135139@pytest .mark .parametrize ("install" , TEST_INSTALLS_WITH_DHW )
136140async def test_turn_off (hass : HomeAssistant , evohome : EvohomeClient ) -> None :
137- """Test SERVICE_TURN_OFF of a evohome HotWater entity ."""
141+ """Test SERVICE_TURN_OFF of an evohome DHW zone ."""
138142
139- # Entity water_heater.domestic_hot_water does not support this service
143+ # Entity water_heater.xxx does not support this service
140144 with pytest .raises (HomeAssistantError ):
141145 await hass .services .async_call (
142146 Platform .WATER_HEATER ,
@@ -150,9 +154,9 @@ async def test_turn_off(hass: HomeAssistant, evohome: EvohomeClient) -> None:
150154
151155@pytest .mark .parametrize ("install" , TEST_INSTALLS_WITH_DHW )
152156async def test_turn_on (hass : HomeAssistant , evohome : EvohomeClient ) -> None :
153- """Test SERVICE_TURN_ON of a evohome HotWater entity ."""
157+ """Test SERVICE_TURN_ON of an evohome DHW zone ."""
154158
155- # Entity water_heater.domestic_hot_water does not support this service
159+ # Entity water_heater.xxx does not support this service
156160 with pytest .raises (HomeAssistantError ):
157161 await hass .services .async_call (
158162 Platform .WATER_HEATER ,
0 commit comments