diff --git a/homeassistant/components/xiaomi_miio/vacuum.py b/homeassistant/components/xiaomi_miio/vacuum.py index a32a28993cac3..4efb6fe7d7169 100644 --- a/homeassistant/components/xiaomi_miio/vacuum.py +++ b/homeassistant/components/xiaomi_miio/vacuum.py @@ -60,7 +60,13 @@ extra=vol.ALLOW_EXTRA, ) -FAN_SPEEDS = {"Silent": 38, "Standard": 60, "Medium": 77, "Turbo": 90, "Gentle": 105} +FAN_SPEEDS = { + "Silent": 101, + "Standard": 102, + "Medium": 103, + "Turbo": 104, + "Gentle": 105, +} ATTR_CLEAN_START = "clean_start" ATTR_CLEAN_STOP = "clean_stop" diff --git a/tests/components/xiaomi_miio/test_vacuum.py b/tests/components/xiaomi_miio/test_vacuum.py index 47c7a98023ce5..4b0eaeebfe85e 100644 --- a/tests/components/xiaomi_miio/test_vacuum.py +++ b/tests/components/xiaomi_miio/test_vacuum.py @@ -68,7 +68,7 @@ def mirobo_is_got_error_fixture(): mock_vacuum = mock.MagicMock() mock_vacuum.status().data = {"test": "raw"} mock_vacuum.status().is_on = False - mock_vacuum.status().fanspeed = 38 + mock_vacuum.status().fanspeed = 101 mock_vacuum.status().got_error = True mock_vacuum.status().error = "Error message" mock_vacuum.status().battery = 82 @@ -261,11 +261,11 @@ async def test_xiaomi_vacuum_services(hass, caplog, mock_mirobo_is_got_error): await hass.services.async_call( DOMAIN, SERVICE_SET_FAN_SPEED, - {"entity_id": entity_id, "fan_speed": 60}, + {"entity_id": entity_id, "fan_speed": 102}, blocking=True, ) mock_mirobo_is_got_error.assert_has_calls( - [mock.call.set_fan_speed(60)], any_order=True + [mock.call.set_fan_speed(102)], any_order=True ) mock_mirobo_is_got_error.assert_has_calls(STATUS_CALLS, any_order=True) mock_mirobo_is_got_error.reset_mock() @@ -277,7 +277,7 @@ async def test_xiaomi_vacuum_services(hass, caplog, mock_mirobo_is_got_error): blocking=True, ) mock_mirobo_is_got_error.assert_has_calls( - [mock.call.set_fan_speed(77)], any_order=True + [mock.call.set_fan_speed(103)], any_order=True ) mock_mirobo_is_got_error.assert_has_calls(STATUS_CALLS, any_order=True) mock_mirobo_is_got_error.reset_mock()