Shelly Flood Sensor Integration Experience

Hi everyone,

I wanted to share my experience with integrating the Shelly Flood Sensor into my Home Assistant setup. I’ve been using Shelly devices for a while now, and they’ve been a reliable addition to my smart home ecosystem. However, recently I encountered an interesting challenge with the flood sensor that I thought might be worth discussing.

Initially, I set up the flood sensor using the Shelly binding in Home Assistant. Everything seemed to be working smoothly at first glance—the flood status, battery level, and last update times were all updating correctly. I was quite impressed with how seamlessly it integrated into my existing setup. However, I noticed something peculiar when the sensor went into sleep mode.

When the device is awake, it communicates perfectly through the binding, but once it goes to sleep, it stops updating via the binding channels. Instead, it continues to report status changes through MQTT. This inconsistency was a bit puzzling. I did some digging and found that others in the community had encountered similar issues, especially after updating the device to the latest firmware.

I decided to dive deeper into the problem. I checked the logs and noticed that the Shelly binding was timing out when trying to poll the device while it was asleep. This made sense because the sensor is designed to conserve battery by entering a low-power state. However, I wanted the sensor to be fully functional without relying on MQTT, so I explored a few solutions.

After some research, I discovered that adjusting the polling interval in the Shelly binding settings could help. I reduced the interval to ensure that the device is checked more frequently, which helped in capturing the status updates even when the sensor was awake. Additionally, I found that enabling the event-based updates in the binding settings made a significant difference. This way, the sensor doesn’t rely solely on periodic polling but instead triggers updates based on actual events.

Another thing I did was set up a rule in Home Assistant to trigger actions based on MQTT messages from the sensor. This acted as a fallback, ensuring that even if the binding channels were down, the system could still respond to flood alerts through MQTT. It’s a bit of a workaround, but it ensures that the functionality isn’t compromised.

I also reached out to the Shelly community and the Home Assistant forums for insights. It turns out that this behavior is somewhat expected due to the sensor’s low-power design, but there are ongoing efforts to improve the binding’s compatibility with such devices. In the meantime, tweaking the settings and using MQTT as a secondary method has been working well for me.

This experience taught me a valuable lesson about the importance of understanding device behavior and being flexible with integration methods. It’s also a reminder of how helpful the Home Assistant community is in troubleshooting and finding creative solutions.

I hope this分享 helps someone who might be facing a similar issue. If you have any questions or suggestions, feel free to reach out!

Best regards,
Justus