Closed rhockenbury closed 3 months ago
Hi,
This was done for redundancy, is the situation that a critical notification was generated by no water detected?
Yeah, I think the way it was implemented makes a lot of sense for the typical use case of detecting a leak. In that situation, it will report a leak if it detects water until the user acknowledges it by clearing the notification in the Moen app.
My situation is that I have one Moen water sensor rigged up as a rain detector, and the behavior that I would want with that is to only show that water is detected when there is water present (when it's raining), and for it to self-clear when there is no water present (it's not raining). The notification check prevents it from self-clearing after it has stopped raining.
I realize this use case is a little outside the box, but wanted to check first to see if it might be something you would be interested in supporting.
Ah...Actually, I see the value of an auto-clear for the homekit sensor. So, it's added in the posted version in the repo. Only did a smoke test, but it should function as you desire. Update the readme -- surpressWaterNotification set to true should do what you want. The config UI was also updated, it is under advance features.
Awesome! Appreciate the quick attention. If it's not too much trouble, are you able to publish an alpha/ beta release to make it easier to pull into homebridge for testing?
I ran a few initial tests and the updates seem to be working as intended. I can continue to test and let you know if I run into any issues. Thanks for implementing this.
Part of release 1.0.10
Is your feature request related to a problem? Please describe:
When setting LEAK_DETECTED for a water sensor, there's a check for a critical notification or water detected.
https://github.com/haywirecoder/homebridge-flobymoen/blob/00b06fe0035c72684af639ced05c208ab33c2b96/accessories/waterSensor.js#L33
I would like the behavior to be to only set LEAK_DETECTED when water is detected. Currently, if water is detected, a critical notification gets created which has to be cleared manually in the Moen app in order for LEAK_NOT_DETECTED to be set.
Describe the solution you'd like:
Introduce a new config parameter that would be used to determine whether to check for water detected, or for critical notifications and water detected.
Describe alternatives you've considered:
Additional context: