sibbl / hass-lovelace-kindle-screensaver

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
MIT License
311 stars 71 forks source link

Time Settings - #58

Closed Leticron closed 4 months ago

Leticron commented 1 year ago

Hi,

thank you for providing the docker container. One thing I observed was a time zone discrepancy with day-light saving time. My rendered screenshot was always 1 hour earlier than the actual system time.

I solved this by using the TZ=Europe/City environment variable in the docker-compose file. This correctly displayed the correct time.

Hope this solves somebody some troubles

814d3 commented 1 year ago

Thank you, unfortunately I read your comment after some time of troubleshooting :-/. I don't know why the behavior changed, but after a update of HA and this project I recognized that the weather integration of HA displayed the right time in HA, but a different one in the kindle screensaver .png. I solved it by adding "- /etc/localtime:/etc/localtime:ro"

in the volumes section of the compose file. @sibbl, please think about adding @Leticron or my solution. Greetings

sibbl commented 1 year ago

Thanks for your input!

Actually Home Assistant will also allow to configure the timezone to display in the UI with the upcoming 2023.07 update.

Maybe this also helps a lot and I probably should a section about this to the Readme in the near future as well.

814d3 commented 1 year ago

Well, the timezone of HA is changable in the HA settings. But it seems that the weather integration uses the timezone of the browser that accesses the dashboard, not the one of the host. While the date&time entitiy/sensor does it the other way around and uses the host timezone.