You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Auto-Update "Last Changed" when battery level restores to 100% #4531
Is your feature request related to a problem? Please describe.
Would be nice to have the 'Last Changed' value auto-update when the system detects the battery has been replaced. Example logic (with some user tunable settings )to cause 'battery replaced' detection...
In my prior HA system we had this feature and its very useful, especially when you have 30 or 40 battery devices to contend with.
Describe the solution you'd like
Battery was <=80% and changes to 95%-100% for more than 12 hours
-- logic like this helps avoid glitches with incorrect value reads/updates and still detect when an actual battery is changed; often battery values take a while to update, or the device may go offline for a bit, having a user defined 'more than N hours' value helps with this.
Describe alternatives you've considered
none, not sure how to make this happen with battery notes,
Exactly why I'm asking for the feature request. This function is what I'd consider a core maintenance item that should be in the main code, not an external automation.
Then why not make it a selective option when setting up each device. That way it gives the higher end features but only caters to those who purposefully turn it on.
Activity
andrew-codechimp commentedon Mar 24, 2026
Hi,
I don't do this automatically but there are events and blueprints you can use to do it yourself.
https://codechimp.org/HA-Battery-Notes/events/#battery-increased
https://codechimp.org/HA-Battery-Notes/blueprints/#battery-replaced
There is also the option to filter outliers to handle battery reporting glitches
https://codechimp.org/HA-Battery-Notes/#filter-outliers
Ltek commentedon Mar 26, 2026
Exactly why I'm asking for the feature request. This function is what I'd consider a core maintenance item that should be in the main code, not an external automation.
andrew-codechimp commentedon Mar 26, 2026
I've chosen to do it via external automations so that people can have choice on how it works, there are too many edge cases for a generic solution.
bluedragon456 commentedon Apr 5, 2026
Then why not make it a selective option when setting up each device. That way it gives the higher end features but only caters to those who purposefully turn it on.
andrew-codechimp commentedon Apr 5, 2026
I did see an integration that had optional automations the other day that gave me some inspiration on this.
Before an automation I'd want to have threshold overrides per device though so will add that to the backlog.