Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

battery_age entity #2519

Closed
3 tasks done
gerrieg opened this issue Dec 21, 2024 · 4 comments
Closed
3 tasks done

battery_age entity #2519

gerrieg opened this issue Dec 21, 2024 · 4 comments

Comments

@gerrieg
Copy link
Contributor

gerrieg commented Dec 21, 2024

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.

no problem

Describe the solution you'd like

The age of the battery in days would be interesting for me, perhaps it would be worth implementing.

Describe alternatives you've considered

I need to add an entity for each device with the calculation myself

Additional context

no additional context

@andrew-codechimp
Copy link
Owner

As the battery replaced is a standard datetime you can obviously calculate this and I don't see any other devices offering a separate numeric entity of days when they have a datetime, but get where you are coming from as you'll have to create a template helper for each device.
What's your use case for this? Maybe there's a better way to handle this.

@gerrieg
Copy link
Contributor Author

gerrieg commented Dec 22, 2024

I have some devices that only report low battery yes/no. As I am often away from home for several weeks, it has happened to me a few times that a battery has run low during this time.
If I can see how old the battery is in days, I can replace any low batteries before I go away. Of course, I need to know roughly how long a battery will last for the device beforehand. But maybe this is a special case and I have to solve it myself.
That makes me think, a battery life according to the manufacturer wouldn't be bad either 😉

@andrew-codechimp
Copy link
Owner

I'm still not sure why you need days whilst battery last replaced will show you a friendly formatted days/months ago.
You can use auto entities card to then show a list of all your batteries to quickly glance down, sorted by last replaced.

Battery life according to manufacturer would be very variable, how often is the sensor triggered, brand of battery etc.

@gerrieg
Copy link
Contributor Author

gerrieg commented Dec 23, 2024

Thanks for pointing out the auto entities, I will implement it that way.

@gerrieg gerrieg closed this as completed Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants