My problem: Xiaomi Aqara Door/Window Sensor is not visible in Home Assistant. It’s also missing in Entity Registry.
I have Aqara Gateway, several Aqara switches, Aqara Humidity/Temp sensor and Aqara Door/Window Sensor. This gateway does not support switching to development mode (i’m not able to use xiaomi_aqara component), but I was able to connect it on as an ‘HomeKit Accessory: Aqara Hub’. All devices except Window Sensor are visible and controllable.
When i’m using Mi Home app everything is OK.
My question: how to make Door/Window Sensor visible?
Thanks in advance.
Thanks for response.
I’ve tried to remove and add Door/Window sensor several times using Mi Home app, no effect in hass.
Did you restart hass/reload config? Did you restart Gateway?
It seems hass does not reload list of devices. I removed temperature sensor and it’s still shown in hass with unknown state.
At the very first try when i tried installing them i reconnected the door/window sensor and reseted the gateway. And the usual unplug it from the power supply and let it be for 30 seconds before putting it in the power socket.
Afterwards i restarted HA just to be sure and eventually it popped up.
Do you got the Aquara or the Mijia sensor. I’ve read that some of the people experienced some problems with the Aquara type.
I have an Aquara type, and finally I was able to make it working.
The problem was in the homekit_controller component. It ignores every binary sensor that is not ‘motion’.
I found out that Aqara Window/Door sensor is detected as ‘contact’ and created a patch (pasted below)
After this door sensor works as expected.
I’m not sure should I create a pull-request to hass or not, because it works for my configuration and may not work for other sensors.
Why this solution is not integrated in Home Assistant?
The Aqara door/window sensors MCCGQ11LM won’t appear in Home Assistant if you don’t modify that two files (components/homekit_controller/binary_sensor.py and components/homekit_controller/const.py) like @steck details.
PD: It will be great if you could place that two files for download in same place, so it will be easier for those who want implement this modification. Edit that files manually is quite tricky