Closed wombat70 closed 1 year ago
Interestingly, if enable or disable show_state
in my config, the card renders the switch.immersion_heater_tuya
state history differently on my RPi kiosk (Chromium Browser):
...
- entity: switch.immersion_heater_tuya
show_state: true
...
Compared to:
...
- entity: switch.immersion_heater_tuya
show_state: false
...
I think, mini-graph-card does indeed use a cached history. So, it might get out of sync. Restarting HA seems a possible cause for this, because state updates (to which the card subscribes) just don't arrive anymore. Reloading the page should re-initialize everything. As does (probably) changing options, which explains your observation in the second comment.
I think, there is nothing that should be done about it. Fetching the complete history is relatively compute-intense. So, using a local cache is a good thing. Maybe, the complete history could be re-fetched when re-connecting. But I have not yet found where this is done.
I just returned to this issue...it turns out that there was bad data in the browser cache. I've adjusted the chromium-browser settings to CHROMIUM_FLAGS="--disk-cache-dir=/dev/null --disk-cache-size=1"
(completely disable cache) and the graph looks OK now.
Closing issue.
Hi,
HA versions:
browsers:
I recently made a mini-graph-card for my HA installation, which I typically view in three places (HA Android app, desktop, and a Raspberry Pi kiosk display). It displays the graph of my Octopus energy price history, together with a zero-line. I recently added a Tuya switch which controls the electrical immersion heater in our hot-water tank, so I recently added that switch entity as a secondary axis to the graph.
The problem I am seeing is that the graph data looks different on the Raspberry Pi kiosk display than it does on the desktop browser and Android app (see attached). In the RaspberryPi kiosk graph, there is a period where the state of the switch data is wrong (looks like it remained on when it was really off); it's almost like the mini-graph-card is using its own copy of the switch state history data (and then got itself out of sync).
I was recently playing with other parts of the HA configuration (related to a Modbus controller), so I was restarting HA quite a lot, which was when the issue started.
Any clues as to why the card would look different on my RPi kiosk?
My card config looks like: