Have an ESP32 here collecting data from a HM-600 microconverter and a Shelly 3EM getting energy usage and return and set them up in the energy dashboard…all fine so far, except after midnight:
In the hour after midnight it shows the solar production as a negative value, which is the total production from the previous day as AhoyDTU resets the counter at midnight.
So how can I tell HA that it should start from 0 as well at midnight?
I could disable the daily reset, but I assume once the counter overflows it will show one day a solar production of negative TriZillion GigaWatts/h (o;
I guess, you will need to set the state_class of your sensor to total_increasing
You can do that by creating a template sensor that reads your original sensor’s value and sets its own meta-data.
total_increasing
Similar to total, with the restriction that the state represents a monotonically increasing positive total which periodically restarts counting from 0, e.g. a daily amount of consumed gas, weekly water consumption or lifetime energy consumption. Statistics of the accumulated growth of the sensor’s value since it was first added is updated every 5 minutes. A decreasing value is interpreted as the start of a new meter cycle or the replacement of the meter.
Hi!
I have the same problem with my solar inverter sungrow (iSolarCloud platform).
Could you please share an example of the Sensor template?
I’m confused about the yaml format.
Thanks in adavnce!