How to debug warnings reported from logs?

Since a few updates in HA, I get this error:

2024-05-07 19:11:28.587 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.12/site-packages/tzlocal/unix.py:193: UserWarning: Can not find any timezone configuration, defaulting to UTC.
warnings.warn(“Can not find any timezone configuration, defaulting to UTC.”)

I did my best but I cannot track down the source.

Can someone helpo and give me a hint?

The operating system of your platform doesn’t have a timezone set. If you were running HAOS, this should be taken care of you – you could confirm the timezone setting by checking the Settings > System > Timezone or by ssh’ing to your HA host and running echo $TZ.

Since you’re seeing this warning, I’m presuming you are not running HAOS – I think you’ll need to share your installation method for anything more specific than that.

2 Likes

thx for your reply @atlflyer
Running HA Core on k8s.
I set timedateclt restarted HA same issue .
I set TZ env var restarted HA same issue .

settings → system → general

set your timezone there.

1 Like

I think you have your answer, but also in future please remember that in computer terms, a warning is not an error.

Explain to a 36 year career IT person what is a warning vs an error. In my past experience a warning set by a developer who took time to do so, means that something is not right and it is brought to your attention as it may get worse.
Your reply is useless.

Thanks @francisp . My TZ is set through my config yaml for years and reported correctly in the settings system general. And the Dev tools check config is all green.
I honestly really think that it is something in the integrations custom / or not since it is reported at restart and usually in between integrations load.