diff --git a/homeassistant/components/switchbot/__init__.py b/homeassistant/components/switchbot/__init__.py index 6bad3c25142..82860db6745 100644 --- a/homeassistant/components/switchbot/__init__.py +++ b/homeassistant/components/switchbot/__init__.py @@ -55,6 +55,7 @@ PLATFORMS_BY_TYPE = { Platform.BINARY_SENSOR, Platform.SENSOR, ], + SupportedModels.HUB2.value: [Platform.SENSOR], } CLASS_BY_DEVICE = { SupportedModels.CEILING_LIGHT.value: switchbot.SwitchbotCeilingLight, diff --git a/homeassistant/components/switchbot/const.py b/homeassistant/components/switchbot/const.py index 9993bd95415..7e7a1d185f2 100644 --- a/homeassistant/components/switchbot/const.py +++ b/homeassistant/components/switchbot/const.py @@ -27,6 +27,7 @@ class SupportedModels(StrEnum): HUMIDIFIER = "humidifier" LOCK = "lock" BLIND_TILT = "blind_tilt" + HUB2 = "hub2" CONNECTABLE_SUPPORTED_MODEL_TYPES = { @@ -39,6 +40,7 @@ CONNECTABLE_SUPPORTED_MODEL_TYPES = { SwitchbotModel.HUMIDIFIER: SupportedModels.HUMIDIFIER, SwitchbotModel.LOCK: SupportedModels.LOCK, SwitchbotModel.BLIND_TILT: SupportedModels.BLIND_TILT, + SwitchbotModel.HUB2: SupportedModels.HUB2, } NON_CONNECTABLE_SUPPORTED_MODEL_TYPES = { diff --git a/homeassistant/components/switchbot/manifest.json b/homeassistant/components/switchbot/manifest.json index 2388e5a98b3..c408a369761 100644 --- a/homeassistant/components/switchbot/manifest.json +++ b/homeassistant/components/switchbot/manifest.json @@ -39,5 +39,5 @@ "documentation": "https://www.home-assistant.io/integrations/switchbot", "iot_class": "local_push", "loggers": ["switchbot"], - "requirements": ["PySwitchbot==0.46.1"] + "requirements": ["PySwitchbot==0.47.2"] } diff --git a/requirements_all.txt b/requirements_all.txt index ceca496ea2a..479677849bc 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -87,7 +87,7 @@ PyQRCode==1.2.1 PyRMVtransport==0.3.3 # homeassistant.components.switchbot -PySwitchbot==0.46.1 +PySwitchbot==0.47.2 # homeassistant.components.switchmate PySwitchmate==0.5.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 88255a6d3e4..630d356bcaf 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -75,7 +75,7 @@ PyQRCode==1.2.1 PyRMVtransport==0.3.3 # homeassistant.components.switchbot -PySwitchbot==0.46.1 +PySwitchbot==0.47.2 # homeassistant.components.syncthru PySyncThru==0.7.10