My Wemo Switch reports energy consumption on a daily basis: i.e it is increasing over the day and reset to 0 at midnight.
I would like to create an absolute energy sensor that is increasing continuously over the days, avoiding the midnight disruption.
Maybe not the best, but you could create in input_number and an automation with a numeric_state trigger for your sensor. If triggered and if the new state (trigger.to_state.state) is lower than the old state (trigger.from_state.state), then add the from_state to the input_number.
Create an additional template sensor, that sums your input_number and your sensor, as it will be the total before midnight and the actual since midnight.
Thanks for sharing. Happy to find this. I had the same idea with the yesterday-helper but during thinking about the idea of the trigger states, I have now tried to skip the yesterday-helper stuff and reduced the helper, automation and sensor to only one template sensor: