Howto add TUYA energy meter to the HA energy dashboard

I have a Tuya based kWh meter, but it does not show in the energy dashboard.
What can I do to add it to the energy dashboard ?

At this moment it measures the consumption of my airco, but I would like to use it for my solar panel production.

image

It only shows a power sensor, not an energy sensor. You need to create an integral helper, and add that to your energy dashboard

And don’t forget to use the left method for the integral helper, seems to trip-up most people.

Thanks for pointing me to the integral helper, I did not know it existed.
I created it, and add it to the energy dashboard.

I have no idea about the method to choose, I chose the trapeze method because the docs indicated that it was the most accurate.
Can you explain why the left method would be better please, I would like to learn more about it, and my math and statistics courses are a very long time ago, so I surely forgot some of it.

It comes down to how HA stores values, specifically when they don’t change over time. Search the forum and you’ll find a lot of detailed explanations. In more ‘normal’ situations, trapezoidal does tend to be a better method for approximating an integral, but in this particular use-case the left method is DRAMATICALLY better.

Even with the latest updates to this integration?

See: