Looks like the device has some internal debouncing system. What you could try is to move the reed sensor to one side of the bucket so if it’s tipped to the right the sensor is ‘on’ and to the left it’s ‘off’. You would have to modify the yaml if you go this route.
You can also buy a Zigbee stick and go with the aqara sensor. There are a lot of supported cheap devices that work with Zigbee. Here is a list of devices. It might be a good investment
I set one of these up about a week ago. I then impatiently waited for the first rain storm so I could see if it worked. Hurricane Ida is dumping aboutv6in on us over the next 2 days. 6 hours in and its reading 1.2 inches so far. Super simple setup and seems to be working great.
Anyone know how accurate the temperature sensor in the aqara door sensors is? getting actual outdoor temp would be a nice bonus.
hello the sensor works perfectly but I have a problem restarting zigbee2mqtt or home assistant calculates an opening for me, I read some suggestions in the post but they did not help, how can I solve?
A few words on why this configuration is restart-safe. When Home Assistant is restarted, Zigbee2MQTT sensors may have a wrong state for a few seconds. In our case, the sensor assumes the “Closed” state, although the rain sensor is “Open” in the idle state. Shortly after the restart, however, the correct “Open” state is reported and thus a change from “Closed” to “Open”. This is counted by the History Stats Sensor and that’s why each restart causes the sensor to increase.
In my configuration, the state of the door sensor is not evaluated, but its attribute “contact” is evaluated using a template sensor. This attribute is unknown for the period of time in which the state is not correct and then changes to the correct value. So there is no longer a time with incorrect value, but only with an “unknown” value. This means that “true” (closed) values can now be counted correctly, since the sensor only changes once from “false” (open) to “unknown” to “false” (open) during a restart.
@roberto87, not sure if other people tried this, but I just did a clean “copy/paste” of the code of @AndrejDelany and after a couple of “restarts” stays the correct value.
Did a couple of restarts since the first restart also the original sensor did not change.
But with most of the restarts the original sensor increases with one, whilst the template keeps the correct value. What I did in a previous attempt was check the “retain” option in zigbee2mqtt in the Aqara contact I use in the rain-sensor
Thanks @AndrejDelany, only had to adjust a little for “local language” but happy with how it works.
It’s been almost a year ago that I made this post and installed it in my garden, and I’m happy to announce it’s still working flawlessly. Didn’t even had to change the battery yet.