Riemann integration, is it crazy?

Riemann integration shows units of measurement “kwhh” instead of “kwh”, a double “h”. Is she crazy?
Before you ask, the source sensor will show the correct unit of measurement “wh”

state_class: total
source: sensor.energy_monitor_energia_autoclave
unit_of_measurement: Whh
icon: mdi:chart-histogram
friendly_name: test

source sensor:

state_class: total_increasing
unit_of_measurement: Wh
device_class: energy
friendly_name: Energy Monitor Energia Autoclave

Source unit should be a power unit, not energy.

Power: watt(W) or kilowatt (kW)
Energy: consumed power throughout time frame watt hour (Wh) or kilo watt hour (kWh)

1 Like

I’m a complete idiot!! I inserted the energy sensor instead of the power sensor in source.

2 Likes

If you already have an energy sensor, why are you using an integration helper?

1 Like

That’s the crazy question to ask!

Because the Pzem energy sensor is total increase and I wanted daily and monthly energy data. I thought this was the only way. Are there alternatives?

Riemann (or integration) integration allows you to calculate integral for given instant values, let’s say, you device is only outputting instant power values in W unit and if you want to calculate kWh out of it, you should use Riemann integration to calculate the energy consumption out of it.

If you have already total increasing sensor, it should be in kWh or another energy unit so, use utility meter to track daily or monthly values. You can directly use the initial sensor in energy dashboard too.

1 Like

Yes, I know, in fact I’m twice an idiot because I used utility meters with energy sensors created but which I already had. :mask:
Thank’s