lovelace-plotly-graph-card
lovelace-plotly-graph-card copied to clipboard
Data missing from graphs
Describe the bug A clear and concise description of what the bug is. Data is often missing from graphs. Reproducible on iPad, iPhone, macOS, Ubuntu and Debian. Safari, chrome, Brave browsers. Hone assistant app on iOS and macOS.
This happens intermittently on all platforms. Sometimes it's one data point, sometimes it's multiple data points in a row. The data comes back most of the time if you refresh the page.
Screenshots
If applicable, add screenshots to help explain your problem.

yaml
type: custom:plotly-graph
defaults:
entity:
show_value: true
hours_to_show: 0.5
entities:
- entity: sensor.house_stoking_sensor
filters:
- filter: y !== null && +y > 100
yaxis: y1
show_value: false
line:
color: red
dash: dashdot
- entity: sensor.house_auger_display_sensor
filters:
- filter: y !== null && +y > 90
yaxis: y1
show_value: false
line:
color: white
- entity: sensor.house_heating_idling_sensor
filters:
- filter: y !== null && +y > 40
yaxis: y1
show_value: false
line:
color: white
- entity: sensor.house_uart_pipe_temp
name: UART pipe temp Avg
internal: true
filters:
- median:
window_size: 100
extended: true
centered: true
yaxis: y1
show_value: true
line:
color: green
shape: spline
width: 2
smoothing: 1
- entity: sensor.house_uart_pipe_temp
unit_of_measurement: Pipe Temp
yaxis: y1
show_value: true
line:
color: yellow
shape: spline
width: 2
smoothing: 1
autorange_after_scroll: true
refresh_interval: auto
default_trace:
line:
width: 1
layout:
height: 600
yaxis:
zeroline: false
fixedrange: true
range:
- 100
- 350
yaxis2:
gridcolor: whitesmoke
fixedrange: false
zeroline: false
range:
- 100
- 350
yaxis3:
gridcolor: whitesmoke
zeroline: true
fixedrange: true
grid:
ygap: 1
rows: 1
columns: 1
pattern: coupled
roworder: top to bottom
xaxis:
rangeselector:
bgcolor: '#474747'
'y': 1.11
buttons:
- count: 30
step: minute
- count: 1
step: hour
- count: 2
step: hour
- count: 3
step: hour
- count: 12
step: hour
- count: 1
step: day
- count: 2
step: day
- count: 7
step: day
Additional context Add any other context about the problem here.

and after a refresh of the browser the missing data is back. I've tried it with and without the filters. No difference.

Interesting. Does this also happen with refresh_interval: 10s (auto gets push updates from home assistant, setting a time interval pulls them)
Like MANY other folks I had trouble with refresh_interval in that it doesn't "refresh" so based on your recommendation I use auto which gives me near real-time updates, which I need.
If it gets cold again and I need to use the pellet stove, I can certainly test the other refresh option again.
why would a browser refresh make them show up? The data is clearly there, and I can see it in the log entries.
Jeff
Yes, a browser refresh will fetch everything as one interval so everything should be visible.
- I think the issue with
autois that home assistant may not send every single update if they come in quick succession - and the issue with something like
10sis that I ask home assistant "give me everything between 10 seconds ago and now", and then assume I don't need to fetch anything inside that interval anymore. So it could happen that an update comes later for a timestamp a bit in the past and the card won't asl for it because it thinks it already has it.
I'll take a look soon
One thing I want to try is to assume there may always be data between now and the last know datapoint (instead of between now and the last time I fetched data.
And also to assume there may be missing data between any two datapoints that arrived via the web socket (auto mode)
I just tested the refresh option you suggested. Same problem exists.

after a browser refresh

Ok, thanks. I'll think about how to deal with this without bombarding the home assistant backend with requests