kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
3.04k stars 236 forks source link

Graph doesn't fully render outside local network #1084

Open Balok-Fesarius opened 8 months ago

Balok-Fesarius commented 8 months ago

I've got an air quality graph in home assistant that works fine when accessed within my local network, but only partially renders when accessed via the internet. Any ideas?

HA is accessed using a custom domain through Nginx Proxy Manager.


Local Network IMG_1177

Via Internet IMG_1178

ildar170975 commented 8 months ago

Can you see same with a standard "history-graph"?

Balok-Fesarius commented 8 months ago

Can you see same with a standard "history-graph"?

Yes, That works both on and off-site.

Here's the code for the graph using your add-in that's failing when remote:

- type: 'custom:mini-graph-card'
  name: Outside AQI History
  entities:
  - entity: sensor.purpleair_aqi
  align_header: center
  align_state: center
  animate: false
  color_thresholds: &graphThresholdColors [
    { color: "#00ff00",  value: 0   },
    { color: "#ffff00",  value: 51  },
    { color: "#ff7e00",  value: 101 },
    { color: "#ff0000",  value: 151 },
    { color: "#8f3f97",  value: 201 },
    { color: "#7e0023",  value: 301 } ]                                      
  color_thresholds_transition: smooth
  decimals: 0
  font_size: 100
  font_size_header: 18
  height: 180
  hours_to_show: 24
  line_width: 6
  points_per_hour: 6
  show:
    extrema: false
    icon: false
    labels: true
    labels_secondary: false
  unit: AQI
ildar170975 commented 8 months ago

No idea))). Have you tried purging a browser's cache?

akloeckner commented 7 months ago

Maybe, Lovelace uses the websocket api: https://developers.home-assistant.io/docs/api/websocket . While we use the rest API (I think): https://developers.home-assistant.io/docs/api/rest .

I have no idea though, why that would behave differently.

HypeLaser commented 7 months ago

UPDATE: Please ignore this. I did a full reboot on every device (router, laptop, Home Assistant). And it's working across all devices again. Leaving the message to show how I fixed my issue.


Original message: I have the same problem. Using Safari and accessing via the local IP address directly to the Raspberry Pi, the graphs display correctly. They also display correctly in the iPhone iOS app. But if I try to use the external address, the graph displays as above, greyed out with a max and min of 0.

I have tried clearing cache and cookies to no avail. I'm using 0.12.0

I did update the Core and Supervisor to 2024.3.0 and 2024.03.0 respectively, that's the only updates I remember doing in the last few days.

Quick update: Firefox displays correctly, but Safari doesn't...

Darathor17 commented 2 months ago

I have a similar issue:

That's awfully strange