1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Switchbot Cloud: Fixed Robot Vacuum Cleaner S20 had two device_model name (#160230)

This commit is contained in:
Samuel Xiao
2026-01-04 18:36:24 +08:00
committed by GitHub
parent ff8ad0c9ba
commit d7a9a980d0
3 changed files with 6 additions and 2 deletions

View File

@@ -171,6 +171,7 @@ async def make_device_data(
"K20+ Pro",
"Robot Vacuum Cleaner K10+ Pro Combo",
"Robot Vacuum Cleaner S10",
"Robot Vacuum Cleaner S20",
"S20",
"Robot Vacuum Cleaner K11 Plus",
]:

View File

@@ -245,6 +245,9 @@ def _async_make_entity(
return SwitchBotCloudVacuumV2(api, device, coordinator)
if device.device_type == "Robot Vacuum Cleaner K10+ Pro Combo":
return SwitchBotCloudVacuumK10PlusProCombo(api, device, coordinator)
if device.device_type in VacuumCleanerV3Commands.get_supported_devices():
if (
device.device_type in VacuumCleanerV3Commands.get_supported_devices()
or device.device_type == "Robot Vacuum Cleaner S20"
):
return SwitchBotCloudVacuumV3(api, device, coordinator)
return SwitchBotCloudVacuum(api, device, coordinator)

View File

@@ -476,7 +476,7 @@ async def test_s20_start(
)
async def test_s20set_fan_speed(
async def test_s20_set_fan_speed(
hass: HomeAssistant, mock_list_devices, mock_get_status
) -> None:
"""Test s20 set fan speed."""