Persist the value of a sensor which auto-reset

Hello there! :slight_smile:

I’m currently facing a significant challenge, and I need your assistance.

I have a sensor that measures the total energy consumption, but unfortunately, it resets automatically every day.

Ideally, I would like to create a second sensor that accumulates the total energy consumed without resetting. Essentially, it would continuously add to the total based on the readings from the first sensor.

I have explored all the helpers provided by Home Assistant, but I haven’t found anything that meets my needs.
I considered using a Template Sensor, but I’m unsure about what to include in the Template expression.

Has anyone else encountered a similar issue?

I welcome any ideas or suggestions you may have!
Thank you so much for your help! :heart:

Did you import the sensor in the energy dashboard?

1 Like

Hey @Sandalman ! :slight_smile:
Thank you for your message. :hugs:

I haven’t set up the Energy Dashboard in Home Assistant at all.
When I first tried it a few years ago, it didn’t meet my needs, and I struggled to extract the information I wanted.

You might think I’m reinventing the wheel, but I decided to create my own sensors and charts to track my home energy consumption back then.

That said, I haven’t revisited the Energy Dashboard since. Perhaps it’s time to give it another shot! :sweat_smile:

I now have many more sensors, so it might be a better fit this time.

In the meantime, if you have any suggestions for creating a custom sensor as I described in my original post, I would still be very interested! :slight_smile:

Here’s an example of what I envision for my cumulated sensor:

The energy dashboard is made for you request. Import the sensor and you are ready.

1 Like

Let’s try it then!

Thanks a lot! :pray:

Okay!

I’ve been testing the energy dashboard for about two weeks now, and I must say, it has improved significantly since I last tried it a few years ago! :slight_smile:

It’s now much more useful than before, and for the time being, it meets my needs, so I think we can consider this topic resolved.

That said, I’m still interested in my initial question, particularly regarding the ability to create custom charts and dashboards. While the energy dashboard is extremely convenient, it does have some limitations in certain scenarios.

Nonetheless, I’m happy with how it works for me now. Thank you so much for your help, @Sandalman! I would never have revisited the energy dashboard if you hadn’t mentioned it! :pray: