Custom component to declare/set variables

Hi @rogro82 - I solved most all my issues I was having getting event states and history working. Thread is here: Trying to configure motion history

Only thing that’s not working at the moment is the graph.

30-PM

What would be some things to look at to get the graph working?

Edit: Problem solved and it solved for all of my graph issues throughout.

I was seeing sql errors like below in the homeassistant logs:
sqlite3.DatabaseError: database disk image is malformed

They included messages about recorder and other things. My Logbook and History has not been working either.

After searching, it appears that this is caused by a corrupt home-assistant_v2.db file. The recomendation was to delete it and let HASS recreate one.

Since doing so, ALL graphs work - including state history and my Logbook and History are working as well!

Thank you.