State history not found

Hello people. I’m having trouble viewing state history. When trying to view some state history the message “No state history found.” Is displayed.

Version Home Assistant 0.102.3

Would it have anything to do with this error that is occurring inside the configuration file?

/config/home-assistant_v2.db

Can anyone help me?

You can’t view the database using the Configurator add-on, so don’t worry about that.

Check your log for an error that says something like “SQLite error: disk image is malformed.” If that error exists you’ll probably see a ton of other errors related to not being able to record state history. If you see that, delete home-assistant_v2.db and then restart Home Assistant.

Also, if you set a whitelist or blacklist in the recorder integration, excluded domains/entities will not show state history (but I’m assuming you haven’t done this).

1 Like

Hello, thanks for your attention.
I checked the logs and there is nothing related to the database, no records regarding sqlite.

I deleted the home-assistant_v2 file and restarted, I was unsuccessful.

:frowning:

What are you trying to view state history for? Also, did you set a whitelist/blacklist for recorder as I mentioned before?

Also after deleting the database you lost any state history that existed. That step was only if you saw the “disk image is malformed” error. It will start recording state history again though.

There were no errors in the logs for the SQLite Database, I did the procedure of deleting the file to see if it worked again.

I am trying to see state history because it gives me the possibility to see for example how long the external illumination has been on.
I have a presence sensor that without the history I can’t see the detection history.

erro novo 1

When I go in history I can only view the histories of two days ago.

Could it be something with my time / zone or incorrect date and time?

Mysteriously, the State of History came back to work.

I will keep watching. As I could not identify the solution and the reason for the problem I will close the topic. Thank you.

normal 1 normal 2