Describe the bug
I am using the BTHome integration from the Home Assinstant which uses bthome-ble for the bluetooth BLE discovery. I want to connect a Xiami temperature sensor to my HA system. I flashed the temperatur sensor with the custom image (flasher) and set the config to BTHome. The sensor is correctly discovered in HA but when trying to connect to the device, it does not show all available sensor (temperatur, humidity, battery, ...) but only signal strength. When debugging I noticed that the AdvertisementData contains multiple elements in the service_data dictionary.
Here an example AdvertisementData from the HA logs:
The parser.py here only checks for single element key list but checks against the entire list of keys in service_data. When I changed this line to also pass the uuid and only checks against this single uuid, everything worked fine.
To Reproduce
I hope I put everything in the bug description.
Describe the bug I am using the BTHome integration from the Home Assinstant which uses bthome-ble for the bluetooth BLE discovery. I want to connect a Xiami temperature sensor to my HA system. I flashed the temperatur sensor with the custom image (flasher) and set the config to BTHome. The sensor is correctly discovered in HA but when trying to connect to the device, it does not show all available sensor (temperatur, humidity, battery, ...) but only signal strength. When debugging I noticed that the AdvertisementData contains multiple elements in the
service_data
dictionary.Here an example AdvertisementData from the HA logs:
The parser.py here only checks for single element key list but checks against the entire list of keys in
service_data
. When I changed this line to also pass the uuid and only checks against this single uuid, everything worked fine.To Reproduce I hope I put everything in the bug description.
Additional context NA