Utility meter helper used to convert watts to kWh

I have several Wattage (Power) sensors. I want to convert each of them to kWh (Energy) and then have them show up in my energy dashboard as sub meters. I feel like I should be able to do this with the Utility Meter Helper and stay out of the config YAML, but I’m missing something as it doesn’t seem to be calculating kWh as I had hoped.


Thanks

  • Michèle
1 Like

This describes how to integrate power sensors to energy sensors for use in the dashboard and with utility meters:

Creating a utility meter helper is exactly the way you create a kWh (energy) sensor from a Watts (power) sensor.

A utility meter sensor is setup to use the power sensor as source. It is done in UI - no YAML needed

Edited by tom_l to prevent confusion.

It isn’t, though. The Utility Meter tracks an existing energy source sensor and breaks it down into cycles. You have to provide it with an energy sensor not a power sensor: that’s what the “integration integration” does.

2 Likes

You are right. It is not smart enough to convert power to energy. It does not multiply each value by time duration since last reading.

I know that Jack @Stiltjack .
What I was hoping for is that the Utility Meter Helper would track wattage (power) and calculate kWh (energy) over time. But that’s not happening.
Sorry about the confusing post.

  • Michèle

Thank you @Troon . I noticed that article too. Looks like I got to get into the YAML file. But then I found the Utility Meter Helper and thought maybe it was something new that would avoid me having to fiddle with the YAML file.
Appreciate the helpful response.

  • Michèle

The Riemann sensor is also available as a Helper in the UI.

1 Like

I used the Riemann Helper successfully to calculate energy use for a sensor that outputs a watt value every second.

It seems to work, although I don’t know how to test the accuracy of the calculation.

There are two things that have me scratching my head still. Maybe someone here could answer the question.

Where can I find the config of the helper?
I can’t find the yaml definition in any of the files in my HA base directory.

Is it possible to change the calculation method of an existing sensor?
The only thing I can change in the UI for the helper seems to be the ‘precision’.

I’ll just answer my question myself :stuck_out_tongue:

Where can I find the config of the helper?

Config for the helper is in the .storage directory inside the core.config_entries file.

Is it possible to change the calculation method of an existing sensor?

Just deleting the helper and recreating it with the exact same name seemed to work. As far as I can tell the history of the previous entity has been preserved as well.

I have a working Template for my energy consumption entity in kWh.

If I try to set this up as a helper I get kWmin instead of kWh.
In a older video I have seen that at the bottom of the setup you can choose with scale to you want to see the value. In K for me. How I can achieve this now.