@@ -918,9 +918,9 @@ def test_update_from_dps_partial(status_trait: StatusTrait) -> None:
918918 assert status_trait .state == RoborockStateCode .charging # Unchanged
919919
920920
921- @pytest .mark .parametrize ("pushed" , [201 , 202 , 203 ])
922- def test_update_from_dps_water_slide_ignores_legacy_levels (pushed : int ) -> None :
923- """Legacy water level codes pushed to a water-slide device do not overwrite the slider value."""
921+ @pytest .mark .parametrize ("pushed" , [201 , 202 , 203 , 208 , 251 , 999 ])
922+ def test_update_from_dps_water_slide_ignores_unresolvable_water_codes (pushed : int ) -> None :
923+ """Water codes the slider cannot name do not overwrite the slider value."""
924924 status_trait = _create_cleaning_mode_status_trait (is_water_slide_mode_supported = True )
925925 status_trait .water_box_mode = 235
926926 listener = Mock ()
@@ -933,7 +933,7 @@ def test_update_from_dps_water_slide_ignores_legacy_levels(pushed: int) -> None:
933933 listener .assert_not_called ()
934934
935935
936- @pytest .mark .parametrize ("pushed" , [200 , 209 , 225 , 245 ])
936+ @pytest .mark .parametrize ("pushed" , [200 , WaterModes . CUSTOMIZED . code , 209 , 221 , 225 , 245 , 250 ])
937937def test_update_from_dps_water_slide_keeps_other_water_codes (pushed : int ) -> None :
938938 """Slider codes pushed to a water-slide device are applied."""
939939 status_trait = _create_cleaning_mode_status_trait (is_water_slide_mode_supported = True )
@@ -955,13 +955,14 @@ def test_update_from_dps_water_slide_still_applies_other_fields() -> None:
955955 assert status_trait .water_box_mode == 235
956956
957957
958- def test_update_from_dps_without_water_slide_keeps_legacy_levels () -> None :
958+ @pytest .mark .parametrize ("pushed" , [201 , 202 , 203 , 208 ])
959+ def test_update_from_dps_without_water_slide_keeps_legacy_levels (pushed : int ) -> None :
959960 """Devices without the water slider use the legacy level codes."""
960961 status_trait = _create_cleaning_mode_status_trait (is_water_slide_mode_supported = False )
961962
962- status_trait .update_from_dps ({RoborockDataProtocol .WATER_BOX_MODE : 202 })
963+ status_trait .update_from_dps ({RoborockDataProtocol .WATER_BOX_MODE : pushed })
963964
964- assert status_trait .water_box_mode == 202
965+ assert status_trait .water_box_mode == pushed
965966
966967
967968def test_update_listener (status_trait : StatusTrait ) -> None :
0 commit comments