I have been struggling with using Rule Machine to monitor and properly report low batteries on my devices for over a year so i decided to write a custom app to do the job. Feel free to test and let me know if you would like any additions to the code. Working correctly for me as of 12/21/24.
The built in Notifications App with the Battery Level function wouldn't do the trick for you?
No, constantly getting alerts for batteries at greater than the threshold. Example getting alerts that a window sensor battery is at 98% even though the alert is set to notify when less than 20%.
I find the issue with battery notifications is that some devices fail still claiming 100% and others are good down to the 20s.
That’s been my experience too.
The numbers for battery percentage that nearly all devices report are usually more noise than signal.
Yes, there is a # that can be reported. But rarely does that serve the intended purpose of giving the user a reliable heads up that a battery is truly approaching the end of its useful life.
Added ability to multi-select recipients.
I generally get pretty decent battery reporting out of most of my devices except my generic water sensors like going from 100% to below 30 with nothing in between. It feels pretty device specific to me.
Quite. I have one door contact sensor that always reports 1%. Other devices that will still be reporting over 40% and go dead.
![]()
Using the built-in notifications app for battery reporting doesn’t work for me either, but I have the opposite problem - batteries below the threshold not triggering a notification.
I am using device activity check instead even though I have to remember to go into the app and select new devices so they are.
That happens mostly with lithium batteries because of the way they drop power. Also let's face it, these small devices aren't the most accurate power reporting devices...
I find HSM does a decent job of monitoring most of my battery stuff. Because of lithium, I have mine set to 3% anymore. I also use Device Activity check just to make sure of things.
Code update to fix repeating notification.
A couple of comments intended as constructive feedback.
Because batteries and devices have such different profiles for use, depletion and accuracy I suggest you allow multiple Battery thresholds and the user can place the appropriate devices in the selected category vs a one size fits all.
Secondly, I notice you are doing a cron job but perhaps you should consider subscribing to the battery events so you will be notified as soon as they change and can determine at that point whether to generate a notification or not. That would be the method most aligned with an event subscription model such as Hubitat.
I keep this on my dash among other things.

Basement Sensor is a coin cell so once it shows on the Inactive list for more than a few hours I will replace it.
I appreciate the suggestions. I will see how difficult it will be to implement the grouping thresholds and the subscription method.
Just pushed update 1.3 to allow different thresholds for different groups of devices. As for the other suggestion i am working on that now but may take a min.
1.4 added some examples in the code for the custom configuration items
In addition, devices report battery status in "volts". Those reporting % do a conversion in the driver. Not all drivers use the same 0% voltage and 100% voltage, and some allow you to define the 0 and 100% voltages.
Personally I would prefer all devices reporting voltage in the driver.
Same here.
Personally, I use device activity check and monitor battery levels but usually just wait until device activity check tells me that a device has missed its check-in to replace the battery.
Interesting, when I searched, I did not find any others. Thanks for your solution. I still plan to work on this one but it's good to see that other solutions are available.




