RobertD502 / home-assistant-petkit

Home Assistant integration for PetKit devices
MIT License
156 stars 24 forks source link

TZ issue #38

Closed Alyangula closed 9 months ago

Alyangula commented 9 months ago

Hey @RobertD502 ,

Thanks for this.

I'm a bit of a noob at python, but i had a look through the code and cannot see where it might be getting stuck.

Not sure if its something to do with my location but i seem to have everything required set..

i'm running HA in a container on my QNAP. installed HACS user this method: image have environment variables set: inside container terminal image in container settings within QNAP: image Timezone is set in HA: image

Logs: 2023-09-13 05:12:10.033 ERROR (MainThread) [custom_components.petkit] A timezone could not be found. If you are running Home Assistant as a standalone Docker container, you must define the TZ environmental variable.

let me know if you need any more details or how i can further troubleshoot.

RobertD502 commented 9 months ago

In your configuration.yaml for debugging set tzlocal: debug, save it. Restart home assistant and then try doing it again. After it fails your full HA logs should have some debugging from the tzlocal library.

RobertD502 commented 9 months ago

Nevermind, I see your issue. That isn't a correct TZ you have set. It should be Australia/Darwin NOT Darwin/Australia.

Alyangula commented 9 months ago

.....thanks. lol. apologies for wasting your time.

Did you just look that up here or something? https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

working now: image