New Version of Astral and changes to sun
See original GitHub issue2021.5 makes changes to Astral and how sun works, it is a breaking update for this custom_component.
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 248, in _async_setup_component result = await task File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, 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 251, in calc_percent today = self._relevant_events(now) File "/config/custom_components/circadian_lighting/__init__.py", line 242, in _relevant_events sun_events = self._get_sun_events(now + timedelta(days=days)) File "/config/custom_components/circadian_lighting/__init__.py", line 203, in _get_sun_events location = astral.Location() AttributeError: module 'astral' has no attribute 'Location'
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:22 (5 by maintainers)
Top GitHub Comments
You can replace your init.py file with https://github.com/robertomano24/circadian_lighting/blob/master/custom_components/circadian_lighting/__init__.py
This will get you working again until this repo gets an update.
Sorry for my absence, I have a new puppy and job that have been keeping me busy!
This has been implemented in version 2.0.4-beta, which also changes the component to be async along with a couple other changes. Please test and let me know if everything is working properly - if so I will push to a general release. Thanks!