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
Is your feature request related to a problem? Please describe.
Rather than unknown set the battery replaced date to a sensible default
Describe the solution you'd like
Is date-created available in the HA device registry? If so, would it be possible to write a one-time thing to go thru all devices in Battery Notes, and set “Battery last replaced” on any device having null / Unknown value, to the date that the device was added to HA? --Could be useful to provide a decent approximation of how old some of the batteries are.
When adding a battery note to a device also default the last seen to now, so that the device not reported event will fire for devices that are already unknown.
Describe alternatives you've considered
N/A
Additional context
Date created/modified was added to HA 2024.8, when Battery Notes min version reaches that investigate if those dates can be accessed via the device
The text was updated successfully, but these errors were encountered:
I apologize if this is documented somewhere, but I found this issue and figured it wouldn't hurt to ask here since it seems contextually relevant.
I just setup the integration and some related automations (based on the community ones in the docs). Two of my devices show the last reported date as "Unknown" as they've been dead for some time, so Battery Notes never had a chance to mark a date.
it seems that battery_notes_battery_not_reported events are not created for these devices.
Just curious if that is part of the motivation for this issue (i.e. ensuring that all devices have a reported date one way or another so that this action always has something to compare to)? I imagine alternatively you could have devices with an "Unknown" report date always trigger an event, unless that's undesirable in case for one reason or another it's only "Unknown" temporarily.
I figured it would be prudent to report this minor "oversight" in case that isn't what this issue is about.
Of course in my particular case I can just force the values to some arbitrary date in the past using the developer tools in order to test my notifications :)
EDIT: Ok well doing the above didn't work, so now I'm not totally sure what the culprit is. I made a discussion in regards to this, sorry for the noise.
A fuller description is in the discussion #2223 but when creating the default last replaced data also add a default last seen.
andrew-codechimp
changed the title
Default battery last replaced date to device created date
Default battery last replaced and last seen dates
Oct 16, 2024
Checklist
Is your feature request related to a problem? Please describe.
Rather than unknown set the battery replaced date to a sensible default
Describe the solution you'd like
Is date-created available in the HA device registry? If so, would it be possible to write a one-time thing to go thru all devices in Battery Notes, and set “Battery last replaced” on any device having null / Unknown value, to the date that the device was added to HA? --Could be useful to provide a decent approximation of how old some of the batteries are.
When adding a battery note to a device also default the last seen to now, so that the device not reported event will fire for devices that are already unknown.
Describe alternatives you've considered
N/A
Additional context
Date created/modified was added to HA 2024.8, when Battery Notes min version reaches that investigate if those dates can be accessed via the device
The text was updated successfully, but these errors were encountered: