Feature request: automated battey change detection & log & recommended change date

Request for features:

Create an additional metadata field for each battery powered device: "Battery Change Date"

That field would contain the datestamp when the battery was last changed.

The data could be entered manually.

The Hubitat should also be able to automatically update the field whenever the battery percentage goes up by a configured amount (default = 50%) and remains at the higher value for several (3?) cycles of the device reporting it's battery status to the hub (to eliminate false triggers).

Each battery-change event record (date, level of the old battery when it was removed) would be stored in the hub, visible from the device settings page.

Create an additional metadata field for each battery powered device: "Recommended Battery Change Needed", to be displayed on the device page. This field would be initially blank, then it would show a date computed as:

the date the battery was last changed + the average number of days in each battery-change interval - 7 days * number of previous battery changes that happened when the old battery had zero charge remaining


changed 1 January at 35%
changed 1 April at 20%
changed 30 June at 15%
changed 23 Oct at 0%

(90 days + 90 days + 115 days)/3 - 7 * 1 = Recommended change date: (23 Oct + 91 days) = 22 Jan

If there is not yet any history of battery change events for a device, the user could manually enter a value in this field.

The device page would have an indicator to show whether the Recommended Battery Change Date was entered manually or computed.

Each device would have a preference setting, "Notify at Recommended Battery Change Date" to toggle notifications on/off. This would default to "off" if the recommended date could not be calculated (ie., there was no history of previously logged battery change events for the device and no user-provided date).


I'd welcome more metadata options in general. Especially ones that could be edited in the device list page. So much quicker!

Adding/editing data items to the device is easy (Custom Device Note and Device Data Edit apps both have that capability - see HPM for download). The Battery History would need to be a separate app, but really wouldn't be too hard to write - real question becomes how many battery changes would you want to store.


however, will very rarely if ever happen; particularly if you are using lithium ion batteries - they seem to go from 70% to not responding.

1 Like

Yes, I know it's possible to install the custom device note app (I use it) and then manually enter battery change dates... but that exactly the kind of information that a computer can detect and track for us. This seems like an easy place for Hubitat to make home automation easier for users.

I'm using lithium ion batteries almost exclusively. The reported level before a device stops responding varies a great deal (for example, I've got a motion detector that's using a rechargable CR2 battery. It's still functioning at 16% battery).

For the purpose of calculating the Recommended Battery Change Date, the hubitat could use the date that the device became unresponsive.

1 Like

The problem with this idea is that devices are totally flaky with respect to battery level reporting. There is no consistency. Any attempt on our part to provide the sort of information you want is just going to blow up on users, actually making the situation worse, not better. "Why didn't the hub let me know the battery failed", etc. This is along the lines of "device health". We won't do this -- full disclosure.

And just how is the hub supposed to know the device became unresponsive? Again, not doing anything along these lines.


I understand that detailed battery level reporting is flaky and wildly device-dependent.

However, wouldn't a gross change such as "battery level went from less than 75% to 100% and remained at 100% for the last 3 times it was reported" be sufficient to suggest that a battery has been replaced?


I have a zigbee motion sensor that has been functioning well on 0% battery for the last 6 months. I have a Iris zigbee garden hose valve that reported 100% battery when the battery was dead.

The aforementioned valve has been jumping up and down wrt to battery levels for the last 3-4 weeks (90-100% -> 74% -> 90-100%). Often within the same day. Funny thing is another identical valve, installed at the same time, gives relatively accurate battery readings.

So my experience suggests that device-specific idiosyncrasies would break the test you suggest.

1 Like

Not reliably, no. See @aaiyar above.

Overall, this one goes in the "device health" bucket. Pointless discussion, not happening.

1 Like

Download the Hubitat app