Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA 2022.4: Error during setup of component circadian_lighting #188

Open
jlatvala opened this issue Apr 8, 2022 · 3 comments
Open

HA 2022.4: Error during setup of component circadian_lighting #188

jlatvala opened this issue Apr 8, 2022 · 3 comments

Comments

@jlatvala
Copy link

jlatvala commented Apr 8, 2022

Error during setup of component circadian_lighting
Traceback (most recent call last):
File "/config/custom_components/circadian_lighting/init.py", line 204, in _get_sun_events
location = astral.location.Location()
AttributeError: module 'astral' has no attribute 'location'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/circadian_lighting/init.py", line 108, in setup
hass.data[DOMAIN] = CircadianLighting(
File "/config/custom_components/circadian_lighting/init.py", line 157, in init
self._percent = self.calc_percent()
File "/config/custom_components/circadian_lighting/init.py", line 260, in calc_percent
today = self._relevant_events(now)
File "/config/custom_components/circadian_lighting/init.py", line 251, in _relevant_events
sun_events = self._get_sun_events(now + timedelta(days=days))
File "/config/custom_components/circadian_lighting/init.py", line 206, in _get_sun_events
location = astral.Location()
AttributeError: module 'astral' has no attribute 'Location'

@jlatvala
Copy link
Author

This error is not visible in logs after the first boot after upgrading HA, but if you reboot again, then you see the error

@claytonjn
Copy link
Owner

2.0.8-beta includes the change from @mdieperink that may fix this issue, have you tried installing that version of Circadian Lighting?

@jlatvala
Copy link
Author

2.0.8-beta seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants