From 0afd8243bcd6cf7f5032b27335805f2501f08585 Mon Sep 17 00:00:00 2001 From: Rene Nulsch <33263735+ReneNulschDE@users.noreply.github.com> Date: Thu, 30 Apr 2026 07:40:52 +0200 Subject: [PATCH] Discover HUS-prefixed BLE devices alongside iWoc --- README.md | 6 +++--- custom_components/mysmartbike_ble/config_flow.py | 3 +-- custom_components/mysmartbike_ble/manifest.json | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cab5f1b..cfd95ff 100644 --- a/README.md +++ b/README.md @@ -90,10 +90,10 @@ The integration is configured through the Home Assistant UI: 1. Go to **Settings** → **Devices & Services** 2. Click **+ Add Integration** 3. Search for **MySmartBike BLE** -4. Select your iWoc device from the list +4. Select your iWoc/HUS device from the list 5. Click **Submit** -The integration will automatically discover iWoc devices in range via Bluetooth. +The integration will automatically discover iWoc and HUS devices in range via Bluetooth. ## Troubleshooting @@ -101,7 +101,7 @@ The integration will automatically discover iWoc devices in range via Bluetooth. - Make sure your E-Bike is turned on and in range - Check that Bluetooth is enabled on your Home Assistant host -- Verify that the device name starts with "iWoc" (please report other device names) +- Verify that the device name starts with "iWoc" or "HUS" (please report other device names) ### Connection issues diff --git a/custom_components/mysmartbike_ble/config_flow.py b/custom_components/mysmartbike_ble/config_flow.py index 9ada7ed..d57f763 100644 --- a/custom_components/mysmartbike_ble/config_flow.py +++ b/custom_components/mysmartbike_ble/config_flow.py @@ -99,8 +99,7 @@ class MySmartBikeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): ): continue - # Check if device name starts with "iWoc" - if discovery_info.name and discovery_info.name.startswith("iWoc"): + if discovery_info.name and discovery_info.name.startswith(("iWoc", "HUS")): self._discovered_devices[discovery_info.address] = discovery_info if not self._discovered_devices: diff --git a/custom_components/mysmartbike_ble/manifest.json b/custom_components/mysmartbike_ble/manifest.json index 0f04cbe..1d14d50 100644 --- a/custom_components/mysmartbike_ble/manifest.json +++ b/custom_components/mysmartbike_ble/manifest.json @@ -4,6 +4,9 @@ "bluetooth": [ { "local_name": "iWoc*" + }, + { + "local_name": "HUS*" } ], "codeowners": [