From 884fbdd5ce3703d4d48b4378e0663e43a6faf24d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 18 Dec 2022 14:54:29 -1000 Subject: [PATCH] Bump PySwitchbot to 0.29.1 (#84119) fixes https://github.com/home-assistant/core/issues/82795 closes https://github.com/home-assistant/core/issues/78562 --- homeassistant/components/switchbot/coordinator.py | 5 +++-- homeassistant/components/switchbot/manifest.json | 10 +++++++++- homeassistant/generated/bluetooth.py | 10 ++++++++++ requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/switchbot/coordinator.py b/homeassistant/components/switchbot/coordinator.py index f68c1effc0c566..5783286c5c5731 100644 --- a/homeassistant/components/switchbot/coordinator.py +++ b/homeassistant/components/switchbot/coordinator.py @@ -8,6 +8,7 @@ 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 @@ def __init__( 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 @@ def _async_handle_bluetooth_event( 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 34dfbddbf2e2c0..47df490792c752 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 42bea46086e8b5..177f24939752fb 100644 --- a/homeassistant/generated/bluetooth.py +++ b/homeassistant/generated/bluetooth.py @@ -332,6 +332,16 @@ "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 bbb00ac273beef..db0e6878d78a6b 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 82827b8d6ee672..5776db8ba4df7f 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