File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed
homeassistant/components/switchbot
tests/components/switchbot Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 7575 SupportedModels .HUBMINI_MATTER .value : [Platform .SENSOR ],
7676 SupportedModels .CIRCULATOR_FAN .value : [Platform .FAN , Platform .SENSOR ],
7777 SupportedModels .S10_VACUUM .value : [Platform .VACUUM , Platform .SENSOR ],
78+ SupportedModels .S20_VACUUM .value : [Platform .VACUUM , Platform .SENSOR ],
7879 SupportedModels .K10_VACUUM .value : [Platform .VACUUM , Platform .SENSOR ],
7980 SupportedModels .K10_PRO_VACUUM .value : [Platform .VACUUM , Platform .SENSOR ],
8081 SupportedModels .K10_PRO_COMBO_VACUUM .value : [Platform .VACUUM , Platform .SENSOR ],
123124 SupportedModels .ROLLER_SHADE .value : switchbot .SwitchbotRollerShade ,
124125 SupportedModels .CIRCULATOR_FAN .value : switchbot .SwitchbotFan ,
125126 SupportedModels .S10_VACUUM .value : switchbot .SwitchbotVacuum ,
127+ SupportedModels .S20_VACUUM .value : switchbot .SwitchbotVacuum ,
126128 SupportedModels .K10_VACUUM .value : switchbot .SwitchbotVacuum ,
127129 SupportedModels .K10_PRO_VACUUM .value : switchbot .SwitchbotVacuum ,
128130 SupportedModels .K10_PRO_COMBO_VACUUM .value : switchbot .SwitchbotVacuum ,
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ class SupportedModels(StrEnum):
5959 GARAGE_DOOR_OPENER = "garage_door_opener"
6060 CLIMATE_PANEL = "climate_panel"
6161 SMART_THERMOSTAT_RADIATOR = "smart_thermostat_radiator"
62+ S20_VACUUM = "s20_vacuum"
6263
6364
6465CONNECTABLE_SUPPORTED_MODEL_TYPES = {
@@ -79,6 +80,7 @@ class SupportedModels(StrEnum):
7980 SwitchbotModel .CIRCULATOR_FAN : SupportedModels .CIRCULATOR_FAN ,
8081 SwitchbotModel .K20_VACUUM : SupportedModels .K20_VACUUM ,
8182 SwitchbotModel .S10_VACUUM : SupportedModels .S10_VACUUM ,
83+ SwitchbotModel .S20_VACUUM : SupportedModels .S20_VACUUM ,
8284 SwitchbotModel .K10_VACUUM : SupportedModels .K10_VACUUM ,
8385 SwitchbotModel .K10_PRO_VACUUM : SupportedModels .K10_PRO_VACUUM ,
8486 SwitchbotModel .K10_PRO_COMBO_VACUUM : SupportedModels .K10_PRO_COMBO_VACUUM ,
Original file line number Diff line number Diff line change @@ -1223,3 +1223,28 @@ def make_advertisement(
12231223 connectable = True ,
12241224 tx_power = - 127 ,
12251225)
1226+
1227+
1228+ S20_VACUUM_SERVICE_INFO = BluetoothServiceInfoBleak (
1229+ name = "S20 Vacuum" ,
1230+ manufacturer_data = {2409 : b"\xb0 \xe9 \xfe \xc3 \x1a !:\x01 \x11 \x1e \x00 \x00 d\x03 " },
1231+ service_data = {
1232+ "0000fd3d-0000-1000-8000-00805f9b34fb" : b"\x00 \x00 d\x00 \x10 \xe0 P" ,
1233+ },
1234+ service_uuids = ["cba20d00-224d-11e6-9fb8-0002a5d5c51b" ],
1235+ address = "AA:BB:CC:DD:EE:FF" ,
1236+ rssi = - 60 ,
1237+ source = "local" ,
1238+ advertisement = generate_advertisement_data (
1239+ local_name = "S20 Vacuum" ,
1240+ manufacturer_data = {2409 : b"\xb0 \xe9 \xfe \xc3 \x1a !:\x01 \x11 \x1e \x00 \x00 d\x03 " },
1241+ service_data = {
1242+ "0000fd3d-0000-1000-8000-00805f9b34fb" : b"\x00 \x00 d\x00 \x10 \xe0 P" ,
1243+ },
1244+ service_uuids = ["cba20d00-224d-11e6-9fb8-0002a5d5c51b" ],
1245+ ),
1246+ device = generate_ble_device ("AA:BB:CC:DD:EE:FF" , "S20 Vacuum" ),
1247+ time = 0 ,
1248+ connectable = True ,
1249+ tx_power = - 127 ,
1250+ )
Original file line number Diff line number Diff line change 2121 K11_PLUS_VACUUM_SERVICE_INFO ,
2222 K20_VACUUM_SERVICE_INFO ,
2323 S10_VACUUM_SERVICE_INFO ,
24+ S20_VACUUM_SERVICE_INFO ,
2425)
2526
2627from tests .common import MockConfigEntry
3637 ("k10_vacuum" , K10_VACUUM_SERVICE_INFO ),
3738 ("k10_pro_vacuum" , K10_PRO_VACUUM_SERVICE_INFO ),
3839 ("k11+_vacuum" , K11_PLUS_VACUUM_SERVICE_INFO ),
40+ ("s20_vacuum" , S20_VACUUM_SERVICE_INFO ),
3941 ],
4042)
4143@pytest .mark .parametrize (
You can’t perform that action at this time.
0 commit comments