I would like to monitor and display in a graph at what time the battery of my PV system is fully charged. I would like to see how this evolves during the year. The reason is curiosity and this study: https://solar.htw-berlin.de/studien/stromspeicher-inspektion-2025/ (German), see the section Prognosebasierte Ladestrategien verlängern die Batterielebensdauer. It seems that it is better for the battery if it is not such a long time in a fully charged state.
So far I created a helper of the type input_datetime and an automation (see below). The automation works as intended and once the battery is fully charged I get a new value in input_datetime.battery_full_time.
However, I don’t get it which card I need to take to display a time series e.g. one month of "full_time"s and to have a history to look at.
I assume that the helper of type “input_datetime” was perhaps not the right choice.
Could anyone please give me a hint how to do this?
An aside and not really directly related to your problem: I have observed that number of charge cycles affects battery life as well for some battery technologies. Are you tracking that is well?
@IOT7712 The number of cycles is essentially the number of day-night cycles. I’ve no influence on that. When the charging starts, in particular in summer, I can affect and easily reduce the time during which the battery is fully charged by a few hours per day - which results in a reduction of a couple hundred hours per year.
Meanwhile I found the Time & Date Integration. This could be helpful to solve my problem. But it seems that I need to write a template. And I have no clue about that.
A battery is fully charged if all it’s cells share the same cellvoltage and if this voltage reaches a value where the battery asks for a chargestop.
That simple. Chances all cell have the same cellvoltage while being charged is close to 0%. If interested dig the https://www.photovoltaikforum.com/ (german)
And sorry I can’t name a single battery where the SOC gets measured, it’s an assumption based upon cellvoltages and if done worse like BYD does the first cell hitting the static upper voltage level results in a chargestop followed by adjust the SOC whichever value that had till then, by turning it to 100%.
if your chargerate was too aggressive this could happen at 85% SOC.
And you later realise that problem when trying to discharge the capacity since if only 85% of the capacity got charged you can hardly consume 95% of the capacity installed later.
Build something based upon measured values not ones where the manufacturer sort of rolled dice to be able to present a value which might impress you.
And watch your chargerate if exceeding 0.2C when the assumed SOC > 85%. Then it simply not nothing to do with battery health, no matter how much cylces you spent.
If your battery got charged to 100% way to early, better discharge it using a lower discharge rate, in case of a BYD HVS until the SOC dropped below 95% since then the inverter gets entited to charge again. And a multiple of these discharge/charge sequences result it a much more realistic 100% SOC == full capacity stored aswell as a much smaller delta of cell voltages if acting with 0.2C or even less for the last few SOC %tages.
Thanks, @justone for the interesting insights into charging of batteries.
However, could we please concentrate on the original topic, which is the question as to how to generate a time series/history of acquired time values to show in a diagram. (And which is a question directly related to HA).
No easy one I could think of.
Played a while with apex charts … and I bet I know what you’re after … an yaxis representing the hour when the 100% SOC was reached im HH:MM … but can’t think of one.
Played with an apex chart with the following lines:
graph_span: 30d
span:
start: day
offset: "-30d"
chart_type: scatter
and within the series with the SOC entity
transform: "return x > 99 ? x : null;"
statistics:
type: max
period: hour
though … in the past 30 day my battery rarely hit the 100% SOC
For testing purposes, it’s easy to set the threshold to a lower value, e.g. 25%.
Your idea with apex-charts seems to go into the right direction. I tried:
type: custom:apexcharts-card
header:
show: true
title: Battery full time
colorize_states: true
graph_span: 30d
span:
start: day
offset: "-30d"
chart_type: scatter
series:
- entity: input_datetime.battery_full_time
I’ll have to see how that develops. At least it looks like a good start. But with the all-grey outside, I think I have to set the threshold to 20% that I get a value each day.