So I just finished setting up HA in my raspberry pi 4 and I really like it so far. I have set up with local tuya to read energy meter based on tuya installed after the meter from the energy company and so far its working great.
The meter does output realtime watt, voltage, and ampere. Apart from that its also output KWh reading from one of its sensors, and everything is recorded on HA.
However the KWh reading is accumulative, works like odometer in a car, its always counts up, never resets. Is there’s a way so HA can analyze this data for statistics? the KWh reading of the smart meter is very accurate compared to the KWh reading from the power company. I calculate manually this 99.7% accurate so I think that is acceptable.
For example, KWh used for last hour, last day, last 7 days, last 30 days, kwh used for particular month etc. So far I manually do this in excel sheet capture the KWh reading in the beginning of the month, and capture at end of the month or so.
Example of KWh sensor reading