home-assistant-neerslag-app
home-assistant-neerslag-app copied to clipboard
Timezone issue
Hi, I'm in the UK and we are currently GMT+1. The data from buienradar looks like this at the time of writing this 16:10
data: 112|17:15 099|17:20 000|17:25 108|17:30 096|17:35 104|17:40 112|17:45 133|17:50 104|17:55 106|18:00 117|18:05 106|18:10 000|18:15 000|18:20 000|18:25 000|18:30 123|18:35 000|18:40 000|18:45 092|18:50 104|18:55 092|19:00 000|19:05 000|19:10
icon: mdi:weather-cloudy
friendly_name: neerslag_buienradar_regen_data
However the card on the dashboard seems to show nothing is due for the next hour when actually it is happening right now and it always stays like this until we go back to GMT
Is there anyway to adjust the timezone of the data to match the chart as it seems to be an hour ahead?
Currently there is no manual way to adjust the timezone. The rain data is being being collecting from an external source and processed as-is. For Buienradar it will be GMT + 1 (Netherlands). There is no specific timezone manipulation.
I was hoping for something simple like adjusting the axis on chart by some offset, but not the data. Thanks for responding
Could it be that you are using a browser, like Firefox, that has fingerprinting protection enabled? If that's the case the browser will report your timezone to be UTC. That's possibly where it goes wrong. In my case the card is off by several hours.
@aex351, There are several options on how you could manage such situations:
- It may be worth having the card pick up the local time from the HA sever instead of the browser,
- you could get the timezone from the lat/long through an API call.
- you could change the card to display time increments from 'now' instead of absolute time. (eg now, 10 min from now, 20 min from now, etc.)
It's a bit of an edge case but consider you're traveling and looking at the card from halfway across the world. What would you expect to see? The local time where the HA install is or the current time of where you are?