diff --git a/homeassistant/components/switchbot/coordinator.py b/homeassistant/components/switchbot/coordinator.py index f68c1effc0c..5783286c5c5 100644 --- a/homeassistant/components/switchbot/coordinator.py +++ b/homeassistant/components/switchbot/coordinator.py @@ -8,6 +8,7 @@ from typing import TYPE_CHECKING, Any import async_timeout import switchbot +from switchbot import SwitchbotModel from homeassistant.components import bluetooth from homeassistant.components.bluetooth.passive_update_coordinator import ( @@ -44,7 +45,7 @@ class SwitchbotDataUpdateCoordinator(PassiveBluetoothDataUpdateCoordinator): base_unique_id: str, device_name: str, connectable: bool, - model: str, + model: SwitchbotModel, ) -> None: """Initialize global switchbot data updater.""" super().__init__( @@ -81,7 +82,7 @@ class SwitchbotDataUpdateCoordinator(PassiveBluetoothDataUpdateCoordinator): self.ble_device = service_info.device if not ( adv := switchbot.parse_advertisement_data( - service_info.device, service_info.advertisement + service_info.device, service_info.advertisement, self.model ) ): return diff --git a/homeassistant/components/switchbot/manifest.json b/homeassistant/components/switchbot/manifest.json index 34dfbddbf2e..47df490792c 100644 --- a/homeassistant/components/switchbot/manifest.json +++ b/homeassistant/components/switchbot/manifest.json @@ -2,7 +2,7 @@ "domain": "switchbot", "name": "SwitchBot", "documentation": "https://www.home-assistant.io/integrations/switchbot", - "requirements": ["PySwitchbot==0.23.2"], + "requirements": ["PySwitchbot==0.29.1"], "config_flow": true, "dependencies": ["bluetooth"], "codeowners": [ @@ -24,6 +24,14 @@ { "service_uuid": "cba20d00-224d-11e6-9fb8-0002a5d5c51b", "connectable": false + }, + { + "manufacturer_id": 2409, + "connectable": false + }, + { + "manufacturer_id": 89, + "connectable": true } ], "iot_class": "local_push", diff --git a/homeassistant/generated/bluetooth.py b/homeassistant/generated/bluetooth.py index 42bea46086e..177f2493975 100644 --- a/homeassistant/generated/bluetooth.py +++ b/homeassistant/generated/bluetooth.py @@ -332,6 +332,16 @@ BLUETOOTH: list[dict[str, bool | str | int | list[int]]] = [ "domain": "switchbot", "service_uuid": "cba20d00-224d-11e6-9fb8-0002a5d5c51b", }, + { + "connectable": False, + "domain": "switchbot", + "manufacturer_id": 2409, + }, + { + "connectable": True, + "domain": "switchbot", + "manufacturer_id": 89, + }, { "connectable": False, "domain": "thermobeacon", diff --git a/requirements_all.txt b/requirements_all.txt index bbb00ac273b..db0e6878d78 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -40,7 +40,7 @@ PyRMVtransport==0.3.3 PySocks==1.7.1 # homeassistant.components.switchbot -PySwitchbot==0.23.2 +PySwitchbot==0.29.1 # homeassistant.components.transport_nsw PyTransportNSW==0.1.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 82827b8d6ee..5776db8ba4d 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -36,7 +36,7 @@ PyRMVtransport==0.3.3 PySocks==1.7.1 # homeassistant.components.switchbot -PySwitchbot==0.23.2 +PySwitchbot==0.29.1 # homeassistant.components.transport_nsw PyTransportNSW==0.1.1