Dump Utility Meter Values when sensor will be reset

HI all,
I am using several Utility meters for getting Daily, Weekly, Monthly and yearly calculations of my energy consumption and production (photovoltaik) - because my Solar Integration does only provide some information like: daily, monthly, yearly and total production - but export / import and so on are just daily values.

Now, I have created utility meters for a better / deeper insight.

The question is now, how can I write the sensors “last state” when it does reset…

For example:

Monthly Utility meter:
export_kwh_monthly => August: 1234 kWh
export_kwh_monthly => September: 955 kWh
export_kwh_monthly => October… and so on.

Means:
I want to create a history for each month, year and so on and the total value should be saved.
That could be a sensor, or an excel sheet, or just a db table - which I can query when needed.

Is there a way to acheive this?
Is there some kind of “History Sensor” that would allow this kind of configuration?

Did you look at the energy dashboard ? It is providing daily weekly monthly and yearly summary taking into account the tariffs you defined… The solar production is also splitted in different colors based on the tariff (tariff called “nuit” (night and week-ends) and “jour” (days during the week) in my case)…

example:

Hi, Thanks for your reply.
yes, and I am already using the Energy Dashboard.

Anyway - I could need this method for further / other statistics and options which can’t be integrated into the energy dashboard at the moment (or in future)…
Maybe, it will be a bit clearer when I share some screenshots… :slight_smile:

Energy Dashboard 01: Solar Production, Export and Import per day:

Energy Dashboard 02: Single devices for the Production, Export, Import statistics:
Washningmachine, and the terrariums are not connected to the solar installation and using a different meter.
Therefore they have been added to that statistic:

Energy Dashboard 03: Single devices which are covered by the Solar Installation and already included into the Import / Export / Selfconsumption

For example:
This morning, I have charged my EV.
Since this has been done mostly with Solar Energy, it is visible in the energy Dashboard Graph 01 (self consumption) and maybe + import

In addition to that, the Wallbox does provide the following information:
Charged kwh this session
charged kwh since connected
charged kwh total
charged kwh today
grafik

I want to extend this statistics with the weekly and monthly charging - since the Wallbox does not provide this counter (it does provide a statistic - but does not expose this to Homeassistant) I am adding them with a utility meter.

I am doing the same for each single device:
grafik


While the energy dashboard is providing a nice graph, I am using these sensors to do further calculations (energy loss during charging, or calculations such as efficiancy autarky etc. over a defined amount of time.

And I need to change a few things in the future that can’t be integrated within the energy dashboard - for such purpose, it would also be required :slight_smile:

here’s my own calculation for the DAILY Solar Efficiancy (autarky, self-consumption ratio)
grafik

And I want to extend this to a monthly and yearly statistic - for which I need the different utility meters.

But in addition to that, I want to store these historical informations even if I need to “redo” my energy dashboard…
So any option to dump these values - for example into a csv or database before they will be resetted would be much appreciated.