Skip to content

Option to latch battery low status #4740

Open

Description

@LewisSpring

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I have some Zigbee Water Leak sensors (Manufacturer: HOBEIAN, Model: Water leak sensor, Model ID: ZG-222ZA) and the battery voltage/percentage can fluctuate when it begins to get low.

Therefore the battery low event keeps retriggering

Describe the solution you'd like

Add an option per-device to latch the battery low state, perhaps until the battery replaced button is pressed.

Describe alternatives you've considered

Adjusting the low battery threshold, but this is not possible as the level can fluctuate so wildly.

Additional context

Image

Activity

  1. andrew-codechimp commented on May 14, 2026

    @andrew-codechimp
    Owner

    Hi, have you tried switching on Filter Outliers (in advanced for the battery note on a device) ?
    That tries to eliminate these fluctuations.

  2. LewisSpring commented on May 14, 2026

    @LewisSpring
    Author

    Hi, have you tried switching on Filter Outliers (in advanced for the battery note on a device) ? That tries to eliminate these fluctuations.

    Hi Andrew, no, I hadn't tried that because I had thought it wasn't applicable to this situation - let me give that a go and let you know if it helps.

    Thanks for the quick reply!

  3. LewisSpring commented on May 15, 2026

    @LewisSpring
    Author

    Morning Andrew
    I've had a go with Filter Outliers, but unfortunately it's having the opposite effect I'd hoped, as it's locked the battery high rather than low

    Image Image

    ⬆️Native Battery

    Image

    ⬆️Battery+

    Image

    These sensors only fluctuate the battery once they are low

  4. andrew-codechimp commented on May 15, 2026

    @andrew-codechimp
    Owner

    It's been a long time since I looked at the outlier code and forgot how it worked, it filters short lows only which is more common.
    A high outlier won't work as looking at your data it spends significant time high.

    An advanced latch option would be the only way to solve this one, but that would rely on you pressing the battery replaced to clear it, and I'd have to think about whether it would be wise to keep the latch during restarts.

    I'll add it as an enhancement but it's quite niche so won't come onto my list that soon.

  5. added
    enhancement
    on May 15, 2026
  6. LewisSpring commented on May 18, 2026

    @LewisSpring
    Author

    Hey Andrew - that's understandable and thank you for the consideration!

  7. gdt commented on Aug 15, 2026

    @gdt

    (I haven't run this integration yet, so grain of salt.)

    I have been using the threshold helper for this sort thing: alarms for a value getting out of range. Battery level, temperature, moisture%, derivatives of moisture%, etc. There is code (which is not hard code) to take a threshold A and a tolerance B, and basically latch on >= A+B, and turn off at A-B, and in between no change. I have further modified my local copy to not change the output on unavailable, but I haven't tried to submit it upstream as I suspect it's messy when that's good and when it isn't.

    It seems to me like @LewisSpring's problem would be nicely sovled by thresholds, basically turn on saying LOW at 10%, turn off at 70%. I will also say that the battery% reporting for that sensors looks really wonky to me. I am used to jitter across thresholds, but hitting 10 and recovering to 100% seems bizarre.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions