Discharge Rate (Drain Rate) - Feature Request #1065
Replies: 3 comments 6 replies
-
I have had this suggest before and it will be an interesting one to explore. |
Beta Was this translation helpful? Give feedback.
-
This highlights the often overlooked idea that you don't really care about your smart device's battery percent. You care when that battery is going to run out. As @PlayFaster mentions, this can currently somewhat be done using a derivative helper and template sensor. Example template to get the timestamp for the estimated time the battery will reach 0: {% set seconds_to_0 =
(states("sensor.some_battery_level")|float
/ states("sensor.some_battery_level_derivative")|float|abs)
* 60 * 60
%}
{{
as_local(as_datetime(
as_timestamp(now()) + seconds_to_0
))
}} I've only played with this concept a little, but I think the biggest challenge might be the time window to choose for the derivative sensor. For a smart phone you might want the window to be an hour, for a smart device it could be days or weeks. Otherwise I think if there's no change in that window it will just say the discharge rate is 0. |
Beta Was this translation helpful? Give feedback.
-
Hi Folks. I've just set up some UTILITY METERS to see what these will show. I've set them up as "Net Consumption" with no reset initially, I will report back with any useful results. Since the large differences in time-spans for battery life seems to be an issue here, I'm hoping a Utility Meter might be useful for recording changes in very slow discharge batteries. If the Utility Meter was reset each time the battery was replaced, its value should be the discharge since the last replacement date? I know that this should just be ((100 - current-value)/time), but not every battery resets to 100% on replacement. This does not account for the issue that the discharge rate can increase as some batteries go low, this is where a weekly or daily meter or statistic would come in I guess? |
Beta Was this translation helpful? Give feedback.
-
Checklist
Is your feature request related to a problem? Please describe.
There is no easy way that I know of to see how fast a battery is discharging "at-a-glance". It can be checked, but its cumbersome and has to be done per battery. There is no easy way to identify batteries that are draining very fast or batteries that are reporting a battery level, but not showing any drain. Maybe the Battery Notes module could provide this?
Describe the solution you'd like
Add a Battery Discharge Rate as an attribute to the Battery Plus sensor please?
Describe alternatives you've considered
This type of information is also available by
However, with these methods, a manual effort must be made, for each battery. I do this via LTS graphs for key/high-drain batteries, but it is cumbersome and would take a lot of work to replicate for each battery.
Additional context
I have been really happy with this module for HA, since I saw it highlighted on the BeardedTinker's YouTube channel. So, a big THANK YOU for creating this - it's really really useful, and for me fills a big gap in HA functionality.
I understand that a discharge rate functionality might not be straightforward to implement, but I'm hoping that it is feasible and seen as worthwhile. I would certainly find it a very useful addition. Thanks
Beta Was this translation helpful? Give feedback.
All reactions