Currently statistic graph cards do have options for mean / min / max / sum / state / change
What is missing is last value based on a given time period. Examples where this would be usefull:
-
If you would like to trace an efficiency percentage of e.g. battery for photovolatics per month that does not work with all the abovementioned settings.
Example: You already have a calculated value on the monthly basis as an entity in percent. Currently the only option seams to use a mean on this already calculated value but this is very inacurate because the average is way different to the real calculated value at the end of the month (that makes sense because one is calculated on absolute values the mean in the statistics card is time based and depends more how long high or low values are existing, furthermore the values from beginning of the period do have higher impact in this case).
Due to that it would make sense to only how the last value in the period (e.g. day, month, week). The statistics graph card should have an option to show only the last value based on an entity in a time period.
E.g.
Jan 82%, Feb 80%, … in the actual period the last Value is the current one until the period ends (e.g. month) -
If you have accumulated precalculated values from devices which are running hardware internal (e.g. photovoltaics inverters) the counting does not depend on 24/7 running Home Assistant instance and there is nothing missing if Home Assistant is down for updates.
Which means this is more acurate than a Home Assistant entity which is couting the current value as a meter.
If you calculate an average based e.g. on a monthly value the only statistics option which could be used is mean. This is also inacurate (like in 1.)
Also in this case the last value in a period is the better option than doing a mean value based on an entity with current values. -
If you would like to calculate something like average kWh per day consumption on a period (e.g. monthly) basis I see no option to do this than to directly calculate the value but in this case I see no option to show the period (e.g. monthly) value in statistics. Last value in a period would also help in this case.
Red = Wrong value because this is average on average / lower right area = correct calculated value