Guys, I need some help.
I’ve currently set up a water meter by using a hall sensor attached to an ESP32 board, configured by esphome.
It works fine now but while testing I did a few initial mistakes which filled up my HA energy dashboard database with a lot (!) of wrong values, as you can see on the screenshot.
Now my plan was go get an SQL client and clean this stuff up but as soon as I try to delete those values, it gives me the errors which you can see on the bottom of the screenshot:
Not a crack and not a lot of time too but…
From what I am known to: the energy dashboard gets its data from statistics table and that gets it from statistics_short_term (with a periodic ‘reset’) and short_term I assume gets it from states (never looked into that)
So, if your states are repaired / proper …that is the basis as else it will continue…no need to touch/delete these if for energy dashbaord
Then you need to repair / update the statistics and align with statistics_short_term
My recommendation is to create new sensors for the dashboard, wait until they show in the statistics and copy/rework the existing data into that until you are happy with the board, then delete the old ones from statistics and those of the statistics_short_term.
Please detail your question, when you setup a more advanced db-server there are always credentials (sqllite is different…‘lite’). The db-server has an ip/port so you can access this via the network as you configured
EDIT, do you have a mariadb setup for your instance?