hass-circadian_lighting
hass-circadian_lighting copied to clipboard
No longer adjusting for time zone.
Efter the latest update my sunset and sunrise shifted 2 hours back. I am in UTC+1 (+1 more for DST), so I suspect something is up with time zone adjustment.
My config said
sunrise_time: '07:00'
sunset_time: '22:00'
But the sensor now changed and showed sunset at 00:00 and sunrise at 09:00.
The version bump to v2 included changes to remove a dependency on timezonefinder
which had a dependency on numpy
which was causing a lot of installation issues for people who were using HA Core installations. This is almost definitely what caused the change in behavior for you.
A couple questions -
- Do you have your time zone properly set in Home Assistant?
- Does the time zone on the host that's running Home Assistant match the time zone set in Home Assistant?
I'm having this issue as well. My timezone is set correctly, it appears as though when sunrise and sunset times are configured that it bypasses the timezone and uses UTC. Removing the set times returns it to normal behavior.
Debian:
:~ $ date
Wed 2 Jun 17:24:10 CEST 2021
Home Assistant docker terminal:
bash-5.0# date
Wed Jun 2 17:24:57 CEST 2021
Home Assistant Info:
I am not sure if there are other ways/places to check?
I think I'm having the same issue. I also had sunrise_time
and sunset_time
set to static values and it seems that those values are not taking timezones into account, so my 06:00:00 sunrise happens at 09:00:00 as I'm UTC+3. Running date
in the Home Assistant OS "Terminal & SSH" add on gives me the correct time and timezone.
Let me know if there is any way for me to find out more details that could help and thank you for the great work you're doing!
Please figure out issue with wrong time and let circadian lighting use timezone instead of core time.
I haven't yet had a chance to look into this or do any testing...my understanding is that the time zone discrepancy is only an issue when sunrise_time
and/or sunset_time
are set - is that correct? Is there any reason why as an immediate workaround users can't just adjust the settings to be the desired time +/- their respective offset from UTC?
I haven't yet had a chance to look into this or do any testing...my understanding is that the time zone discrepancy is only an issue when
sunrise_time
and/orsunset_time
are set - is that correct? Is there any reason why as an immediate workaround users can't just adjust the settings to be the desired time +/- their respective offset from UTC?
That's correct, and yes, setting the time as the time +/- the time difference to UTC works as a workaround. e.g. I can set my sunrise time to 3AM when I am at UTC+3 and want the sunrise ti happen at 6AM. So that works as an easy workaround for now :)
@claytonjn As this has been open for over a year are we able to adjust the docs here:
https://github.com/claytonjn/hass-circadian_lighting/wiki/Advanced-Configuration
to show that these times are in UTC? As it's in the wiki i cant submit a PR.
Confused me for a little bit and it would be great if others don't encounter this :)