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

Setup Issues #175

Open
maddoxjny opened this issue Nov 26, 2021 · 5 comments
Open

Setup Issues #175

maddoxjny opened this issue Nov 26, 2021 · 5 comments

Comments

@maddoxjny
Copy link

Hi Installed from HACS. I get the following error on restart.

Logger: homeassistant.setup
Source: custom_components/circadian_lighting/init.py:206
Integration: circadian_lighting (documentation, issues)
First occurred: 8:17:00 AM (1 occurrences)
Last logged: 8:17:00 AM

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 254, in _async_setup_component
result = await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, 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'

@maddoxjny
Copy link
Author

sorry my bad. removed advanced config and it works. Must have something else going on

@maddoxjny
Copy link
Author

back again

if I try to add any advance settings I get the error. here is the config values

circadian_lighting:
switch:

  • platform: circadian_lighting
    name: Office Auto lighting
    disable_brightness_adjust: false
    min_brightness: 50
    max_brightness: 100
    sleep_brightness: 1
    sleep_entity: input_boolean.sleep_mode
    sleep_state: on
    lights_ct:
    • light.office_lights

if I only use this

circadian_lighting:
switch:

  • platform: circadian_lighting
    name: Office Auto lighting
    lights_ct:
    • light.office_lights

it works

@edno
Copy link

edno commented Dec 11, 2021

Same issue with a basic setup:

2021-12-11 21:12:31 ERROR (MainThread) [homeassistant.setup] 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 254, in _async_setup_component
result = await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, 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'

Configuration:

circadian_lighting:

switch:
   - platform: circadian_lighting
      lights_ct:
        - light.office_lamp

@claytonjn
Copy link
Owner

For some reason the astral module isn't working properly - this is supposed to be included as part of Home Assistant installation. Can you provide some information about how Home Assistant is installed, what versions you're running, etc.? Also, please install release 2.0.7-beta and turn on debug logging so that we can determine what version of Astral is installed.

@edno
Copy link

edno commented Dec 13, 2021

I am running HA2021.11.5 with Docker, and I installed circadian_lighting using HACS 1.18.0.

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

Successfully merging a pull request may close this issue.

3 participants