Energy dashboard inverts electricity usage of single device?

I integrated my smart dishwasher via GitHub - gvigroux/hon: Support of all Haier, Candy, Hoover appliances integrated in the official hOn mobile app. Direct access to all possible services and parameters · GitHub.

It is working nice, but the energy usage calculation is buggy.
The integration brings in a sensor for current energy usage:

state_class: total
unit_of_measurement: kWh
device_class: energy
icon: mdi:lightning-bolt
friendly_name: Dish Washer Current electricity used

which I am tracking as a single device in the energy dashboard.
It starts looking good, but after the dish washer has finished the electricity usage within the last hour is turned negative:

But the regular history graph looks normal:

Actually I can correct this when searching for outliers in the statistics, but this time it does not show a negative value at all.

Any idea what is causing the bug here?

Yeah, that's normal. I see the same behavior on my end.

I'd focus more on the daily usage than the hourly numbers. Smart plugs and similar power sensors often report consumption with a bit of a delay and in larger increments, so they don't always provide enough detail for accurate hour-by-hour tracking.

Because of that, the hourly graphs can look a bit off even though the total daily consumption is correct.

I'd either look for a way to get more frequent updates from the device or just accept that the hourly readings won't be perfectly accurate with this hardware.