History graphs and 61.1 update, strange issues

I have 6 history graphs on 1 tab. Before the update to 61.1 I was running 60.1. I have noticed post upgrade that the graphs are very slow to draw and they first populate all graphs with the same set of data, the first set to graphically represent fills all of them. After 30 seconds or so they will repopulate with the correct data.

configuration.yaml

history_graph:
  gr1:
    name: DR Temperature
    entities:
      - sensor.tankpi_temp
    hours_to_show: 48
    refresh: 60
  gr2:
    name: LR Temperature
    entities:
      - sensor.lr_temp
    hours_to_show: 48
    refresh: 60
  gr3:
    name: MBR Temperature
    entities:
      - sensor.temperature1
      - sensor.humidity1
    hours_to_show: 48
    refresh: 60
  gr4:
    name: Bath Temperature
    entities:
      - sensor.br_temp
      - sensor.br_hum
    hours_to_show: 48
    refresh: 60

  gr5:
    name: Work Temperature
    entities:
      - sensor.temp5
      - sensor.humidity5
    hours_to_show: 48
    refresh: 60

  gr6:
    name: Truck Temperature
    entities:
      - sensor.truck_temp
      - sensor.truck_hum
    hours_to_show: 48
    refresh: 60

4 of these are MQTT sensors on Wemos devices and 2 are command line sensors on other Pi’s. The odd thing is that when the graphs first render the frames may fill with temp and humidity even though the graph only includes temp.

Pi load seems reasonable:

~ uptime
09:27:12 up 13 days, 13:36, load average: 0.30, 0.37, 0.53

database also seems reasonable:
36069376 Jan 24 09:27 home-assistant_v2.db

Although manual database purge is not working in this release.

Any ideas?

So, I have partially solved this issue. The graphs now load with the correct data the first time, but still populate slowly.

The fix was to exclude the actual graph items from the history queue. They were showing on the history page as state unknown.

1 Like

Seems like I spoke to soon, the delay is not as long to populate correctly now. But, it still provides the wrong data for 5 15 seconds on say 75% of the page loads.

Here is how it looks, could not cap the whole screen but the graph just repeats. Notice it also lists the same sensor names during the repeat cycle.

yup, mine too.
I thought that fixed it, but now they are still doing it
each graph loads of random sensor data, then after the 60 refresh time, on first refresh after loading they all settle down to the correct sensors per graph

Great, I am not alone. It was something introduced in 61. I suspect that it is a process slowing down data gathering from the database… just a guess.

So, do one of us need to open and issue? Is it a hassio or home assistant issue, I suspect home assistant in general… but could be in the structure or framework of hassio as well. I do not know docker or a lot about coding in general.

i only setup the history graph two days ago so i have no reference point for speed, but i have five on one page and they load fast enough for me (i have a rpi3)
I don’t have hass.io, only home assistant.

might be worth checking open issues see if it is logged already i guess

looks like a related issue:

I went ahead and threw my config and info on the issue report as well.

Any update on this? 0.66.1 and still very slow graphs…

They are still slow in 70.0 but do load.

I think I have a similar problem in 0.84.6
if I open one device history panel, the graph is first populated with the correct data but after few second it change for data from another device. all type of devices are mixed. If I open one thermostat a get correct data. then the graph change for the data of another thermostat and then it change again for a dimmer data.