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

Integrations and platforms could not be set up #247

Open
fschaal opened this issue Jun 3, 2024 · 0 comments
Open

Integrations and platforms could not be set up #247

fschaal opened this issue Jun 3, 2024 · 0 comments

Comments

@fschaal
Copy link

fschaal commented Jun 3, 2024

Since a few weeks i get the startup message saying circadian lighting cannot setup.

image

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/circadian_lighting/__init__.py", line 119, in async_setup
    await hass.data[DOMAIN]._async_init(interval=conf.get(CONF_INTERVAL))
  File "/config/custom_components/circadian_lighting/__init__.py", line 157, in _async_init
    self._percent = await self.async_calc_percent()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/circadian_lighting/__init__.py", line 292, in async_calc_percent
    a = (y - k) / (h - x) ** 2
             ^
UnboundLocalError: cannot access local variable 'k' where it is not associated with a value

I have this in the configuration:

circadian_lighting:
  sunrise_offset: "-04:00:00"

And this switch:

- platform: circadian_lighting
  lights_ct:
    - light.office
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

1 participant