I had a similar issue. I use Tapo P110 plugs and the integration provides daily and monthly statistics. But the daily values are reseted at 00:00:05 and that causes the problem.
I ended up disabling the statistics coming from Tapo integration and using Powercalc to create all the needed sensors, among others sensors for anything else that doesn’t provide consumption.
I found the problematic sensors checking each to find the exact second when it resets at midnight zooming in its statistics…