Utility Meter without reset

When I report energy usage to pay for water and electricity I type in current water/electricity meter value.
I did not fount an ability in HA to create cumulative sensor and calibrate it to have a sensor that matches meter reading.
If Utility Meter component can be set to work constantly without cycles - it would solve this problem.
So please, consider making an option to have Utility Meter counter without resets.

You should be using a sensor that never resets for utility meter. Thus you already have what you need.

But there is no way to update template sensor for automation.
I have one counter based on PZEM (ESPhome) and I have peak and off peak hours, so I can’t see other options besides utility_meeter.

I’m sorry but it is not very clear what you are asking for/about.
Can you get someone with a greater facility with English to help you explain further ?

Very later reply, but I have the same issue, so I thought it would be best to continue the thread.

TLDR; A no-reset utility meter could be used to split other sensors into different tariffs.

I believe use case is the same as @Oleksii_Zelivianskyi. I have a sensor which keeps track of power consumption in my home. It is a single sensor with total power consumed, and as @tom_l rightfully states, this sensor does not reset.

However, I do have 2 different tariffs for my power (peak and off-peak). So what I need is a way to “split” the power consumption sensor into two sensors. One which gets updated during peak hours, the other during off-peak.

The utility meter has this functionality on board with the tariffs setting. But as this meter resets cyclically (with the longest period being one year) I cannot use this to keep track of the total power consumed. I also do not see another way to achieve this.

Hence the question, would it be possible to extend the utility meter with a no-reset function so that it can be used to split single sensors into different tariffs?

2 Likes

In 2021.09 you can use cron patterns

You can trick utility_meter never to reset with a pattern: 0 0 * */1000 * (resets every 1000 months)

Replying to myself: cycle is actually Optional (documentation is wrong)

That’s interesting new information! I’ll try this over the weekend. My only concern is that because this is not documented, it may be considered a “bug” and the feature might disappear in a next update.

So if it works, we should submit provide feedback to the docs to have this changed.

1 Like

Do I understand correctly, if I will not set “cycle” and “cron” parameters - the sensor will never reset?

Correct, if no cycle is defined the meter will never reset

2 Likes

I needed this feature to track my_lifetime production for a 2nd hand inverter connected to my solar panels. The feeding sensor includes the production of the previous owner so with this feature I can track what it produced for me :slight_smile: Thank you for providing it!

@dgomes The point now is that cron is marked as required. Is it really or not?

it’s documented as either cron or cycle, but if both are absent it never resets

2 Likes

That should probably be stated in the docs.

2 Likes