kWh calculation

Hi all, looking for some advice on this.

I have a Tuya Smart Plug with energy monitoring my dryer; sadly, while via integration it does output the watt, it doesn’t do kwh which is something I wanted to track.

So, following a guide I sore on here, I created an entity using the “Riemann sum integral sensor”, I left it in Trapezoidal rule mode and set the metric prefix to kilo and the time unit to hours.

So based on that previous article, that should use the power measurements to make kWh.

My question is basically, is this right?

I ask because it says for example on the 2nd, it was on once and used 1.67kWh which seems accurate but then the 3rd, when it was used 3 times in a row, it says 50.44kWh which seems abserd.

For reference, it runs for approx 2 hours and 50 min, spending most of that time at 2,500W with 30-60 second intervals of 0

For the device you should look at sensors. There should be a „Energy“ sensor which doing the thing you want. In addition you can create a utility meter with eG hourly reset.

Use mode left.

Okay, ill try this, just so im not following blindly but actually learn, what will this do?

As I said, there is no energy sensor only power. for the utility meter, what is an eG?

For power sources with pulsing or staircase type waveforms the “Left Riemann Sum” integration method is more “real world” accurate than the default “Trapezoidal rule” that is used.