Issue with Energy Diagram

Guys, as you can see from the diagrams below on the 21/08 there are some -0 values for certain devices that are messing up my diagrams. Both Clothes Dryer Consumption and Clothes Washer Consumption has a -0 value.
I have checked the individual values under statistics in Home Assistant but I cannot see any value.

How can I delete/correct this value from the database? Is there another way in doing that?


Hello,
The -0 values are likely caused by null or invalid data points in your Home Assistant database. To correct this, you can try the following:

  1. Check the database: Use the Home Assistant CLI (Command Line Interface) to inspect the database and identify the problematic entries. adpworkforcenow

homeassistant db cli

  1. Delete the invalid entries: Use the delete command to remove the -0 values.

delete from statistics where value = -0;

  1. Recalculate statistics: After deleting the invalid entries, recalculate the statistics to ensure accurate data.

homeassistant stats recalculate

Alternatively, you can also try:

  • Excluding the -0 values: Use a filter in your diagram to exclude the -0 values.

  • Using a custom query: Create a custom query to retrieve the data, excluding the -0 values.

If you’re not comfortable with the CLI, you can also try using the Home Assistant UI to edit the statistics and remove the -0 values manually.

@michael569gardner Thanks for your prompt reply.
I just wanted to let you know under the statistics table there is no value column.
This is the columns that I have

In addition, I am using home assistant in a docker with external mariadb database.