@@ -197,7 +197,7 @@ async def test_filter_turn_on(self, mock_omni, sample_filter_config, mock_teleme
197197 filter_obj ._api .async_set_equipment .assert_called_once_with (
198198 pool_id = 7 ,
199199 equipment_id = 8 ,
200- is_on = True ,
200+ is_on = filter_obj . last_speed ,
201201 )
202202
203203 @pytest .mark .asyncio
@@ -220,44 +220,44 @@ async def test_filter_run_preset_speed_low(self, mock_omni, sample_filter_config
220220 """Test run_preset_speed with LOW preset."""
221221 sample_filter_config .bow_id = 7
222222 filter_obj = Filter (mock_omni , sample_filter_config , mock_telemetry )
223- filter_obj ._api .async_set_filter_speed = AsyncMock ()
223+ filter_obj ._api .async_set_equipment = AsyncMock ()
224224
225225 await filter_obj .run_preset_speed (FilterSpeedPresets .LOW )
226226
227- filter_obj ._api .async_set_filter_speed .assert_called_once_with (
227+ filter_obj ._api .async_set_equipment .assert_called_once_with (
228228 pool_id = 7 ,
229229 equipment_id = 8 ,
230- speed = 40 ,
230+ is_on = 40 ,
231231 )
232232
233233 @pytest .mark .asyncio
234234 async def test_filter_run_preset_speed_medium (self , mock_omni , sample_filter_config , mock_telemetry ):
235235 """Test run_preset_speed with MEDIUM preset."""
236236 sample_filter_config .bow_id = 7
237237 filter_obj = Filter (mock_omni , sample_filter_config , mock_telemetry )
238- filter_obj ._api .async_set_filter_speed = AsyncMock ()
238+ filter_obj ._api .async_set_equipment = AsyncMock ()
239239
240240 await filter_obj .run_preset_speed (FilterSpeedPresets .MEDIUM )
241241
242- filter_obj ._api .async_set_filter_speed .assert_called_once_with (
242+ filter_obj ._api .async_set_equipment .assert_called_once_with (
243243 pool_id = 7 ,
244244 equipment_id = 8 ,
245- speed = 60 ,
245+ is_on = filter_obj . medium_speed ,
246246 )
247247
248248 @pytest .mark .asyncio
249249 async def test_filter_run_preset_speed_high (self , mock_omni , sample_filter_config , mock_telemetry ):
250250 """Test run_preset_speed with HIGH preset."""
251251 sample_filter_config .bow_id = 7
252252 filter_obj = Filter (mock_omni , sample_filter_config , mock_telemetry )
253- filter_obj ._api .async_set_filter_speed = AsyncMock ()
253+ filter_obj ._api .async_set_equipment = AsyncMock ()
254254
255255 await filter_obj .run_preset_speed (FilterSpeedPresets .HIGH )
256256
257- filter_obj ._api .async_set_filter_speed .assert_called_once_with (
257+ filter_obj ._api .async_set_equipment .assert_called_once_with (
258258 pool_id = 7 ,
259259 equipment_id = 8 ,
260- speed = 80 ,
260+ is_on = filter_obj . high_speed ,
261261 )
262262
263263
0 commit comments