Closed bstempien closed 2 years ago
Hey there @jc2k, @ernst79, mind taking a look at this issue as it has been labeled with an integration (xiaomi_ble
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
xiaomi_ble documentation xiaomi_ble source (message by IssueLinks)
Cheers. I'll have a look at this asap. It looks like the device is being parsed properly but there is a mapping missing in HA.
It took it a while for them to start showing up after I installed the core-2022.9.1 update, but now I am getting these in the logs.
2022-09-09 11:44:45.612 ERROR (MainThread) [homeassistant.components.xiaomi_ble]
Unexpected error updating Mi Flood Detector data: <BinarySensorDeviceClass.MOIS
TURE: 'moisture'>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update
_processor.py", line 276, in async_handle_update
new_data = self.update_method(update)
File "/usr/src/homeassistant/homeassistant/components/xiaomi_ble/binary_sensor
.py", line 54, in sensor_update_to_bluetooth_data_update
entity_descriptions={
File "/usr/src/homeassistant/homeassistant/components/xiaomi_ble/binary_sensor
.py", line 55, in
Looks like we update a binary sensor moisture in xiaomi_ble
But this device class isn't added in Home Assistant in xiaomi_ble/binary_sensor.py
Note that the MOISTURE
device class is only available in dev, not in the current release.
Is there an idea on how long before Moisture will move into the mainstream release?
I ask because I am at the start of using these Flood sensors. I had just gotten all of the encryption keys out of the MI Home app when I put core-2022.9 on and the Xiaomi BLE Integration started to populate.
So I am at a crossroads right now. Do I enable Passive BLE monitor again and start building my automation, or hold off until Xiaomi BLE is updated to handle this sensor.
I have 10 of them, so not going to be a trival task to convert, but also not the end of the world.
On Fri, Sep 9, 2022, 1:31 PM Ernst Klamer @.***> wrote:
Looks like we update a binary sensor moisture in xiaomi_ble
But this device class isn't added in Home Assistant
Note that the MOISTURE device class is only available in dev, not in the current release.
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/78147#issuecomment-1242265788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3TSEEGEICBBQ6WOMZHAKLV5NX6VANCNFSM6AAAAAAQIY5W2I . You are receiving this because you authored the thread.Message ID: @.***>
I plan to to try and fix it in a point release if I can. And then add the new device class in next months release.
Probably adding the following will do the trick
XiaomiBinarySensorDeviceClass.MOISTURE: BinarySensorEntityDescription(
key=XiaomiBinarySensorDeviceClass.MOISTURE,
device_class=None,
),
Yep. Replying from my phone so being terse 😅
The problem
I have 10 Xiaomi SJWS01LM MI Flood Detectors. They are found in the Xiaomi BLE integration. I have entered the Bind_key for each detector. They show the Battery status and Voltage, and that is it. I have them also in the Passive BLE Add-on Integration. I have disabled that Add-on for the moment since it seems to conflict with the official Integration. In the Passive BLE the moisture sensor did populate and work.
What version of Home Assistant Core has the issue?
core-2022.9.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
xiaomi_ble
Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_ble
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response