This setup has worked for years, but recently has stopped working properly.
I track the “on” time of a binary sensor “waterdemand” in history stats.
History stat “Waterdaily” is todays total “on” time. That works fine.
History stat “Waterprevious” is yesterdays “on” time. It displays zero and has a zero value looking in dev tools.
If I reboot the system, the correct values appear.
My history stats were originally written in YAML, so I tried deleting and rewriting via the UI. The issue remains.
Does this ring any bells with anyone?