History Graphs not displaying properly

Sorry for the vague title, but I don’t know how else to describe what is happening with the history graph on my hassos install. I’m using mariadb, and haven’t had any issues with this that I’ve noticed until today. I have my history graphs setup to display “24hrs” worth of temp and humid data (“72hrs” just for the barometer graph), but the graphs look like this:

entities:
  - entity: sensor.garage_temperature
  - entity: sensor.master_temperature
  - entity: sensor.hall_closet_temperature
  - entity: sensor.backyard_temp
  - entity: sensor.man_door_temp
  - entity: sensor.master_slider_temp
  - entity: sensor.dining_slider_temp
  - entity: sensor.bath_window_temp
  - entity: sensor.fridge_temp
  - entity: sensor.thermostat_temperature
  - entity: sensor.dining_slider_temp
  - entity: sensor.dining_temperature
hours_to_show: 24
refresh_interval: 0
title: Temperatures
type: history-graph

Untitled

Of course, I expect the graph to show 24hrs on the x, whether the data exists in the db or not like before. That is shows 5 days on the x, with apparently absent data, is new/weird to me. Incidentally, I also use influxdb/grafana, and the current data is displaying properly in grafana (I know, different db, but wanted to mention anyways).

Also this is probably related to my problem… when I click on one of my other entities (say a motion detector), the pop-up window that shows the red/green history graph bar sometimes doesn’t display… have to close and reopen the tab for the bar to get filled properly.

Another related observation… about 3 days ago in my dev logs, I noticed a line mentioning something about HA failed to connect to mariadb (sorry, didn’t copy that log down before it went away). My mariadb size does seem to be getting smaller than normal the past few days. Perhaps something happened that corrupted the db?

I’ve rebooted host since observing this, and it appears new data is showing properly on the graphs (compressed on the right side as showin in photo). I do plan on uninstalling/reinstalling maria db, which I’m guessing might ‘fix’ this. However, I am curious what may have caused it to begin with, and how it may be prevented in the future. I’m on the latest release of hassos, hassio, superviser, addons, etc… Any thoughts welcome… thanks in advance.

Hi

I think that’s a bug in 111.2.
Take a look here History failed?

1 Like

I’m getting the same problem since the last update. Also using mariadb, which may be a clue. I notice that the sensor card works fine, however.

Bug in 0.111.2, will be fixed in 0.111.3… I hope - at least graph issue is recognized and already fixed in coming release. I have the same issue with MariaDB, so downgraded temporarily to 0.111.1 and everything is OK., though I’m not sure (no mentions) if this will fix specifically MariaDB issue (no entries recorded in DB). I’ve seen no log entry for connectivity to DB in my case, but I spoted problem too late, so it could be gone…

p.deelan has the solution for us linked above… looks like just a bug in the latest hassio that will likely get fixed soon. Our data is still there, just need to either downgrade to 111.1 or wait for 111.3.

I just ran across this issue again, I was informed by a handy bot that you need to go in a delete your home-assistant-v2.db file in the same folder as configuration.yaml.and then restart.

Side note you will lose your history but as the bot said, its broken anyways so what does it really matter.

Deleting the database also worked for me. i’m on ver. 2021.2.2