I am using two Hoymiles inverters, read-out by an OpenDTU and connected to HA via MQTT. One inverter is connected to a battery, that discharges every evening.
My problem is to build the daily total yield. The inverter (or OpenDtu) without battery does shortly send a daily yield of 0 Wh, just after the real max daily value and then shuts off and restarts counting on the next day.
How could I use a helper or template-sensor to cutoff this decrease to 0, so just hold the daily max value and only restart counting from 0 at 0:00?