-
Notifications
You must be signed in to change notification settings - Fork 89
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
Component failing after HASS update #219
Comments
Now it started and fluxing sucessfully. 🤷♂️ How about to add else branch with some useful debug logging, so we will know more in case it happens? |
That's a good idea, will leave this open as a reminder to add this when I have time - or I welcome any pull requests |
It is failing again now. I've added debug output to else branch:
This is my config:
|
To help debug claytonjn#219 added else branch with debug output and return, so in case of this event it will at least start and allow to recover later (when timestamps will be in ranges).
I've updated HASS and component can not start:
Home Assistant 2023.3.5
Supervisor 2023.03.1
Operating System 9.5
Frontend 20230309.1 - latest
Logger: homeassistant.setup
Source: custom_components/circadian_lighting/init.py:292
Integration: circadian_lighting (documentation, issues)
First occurred: 11:26:23 (1 occurrences)
Last logged: 11:26:23
Error during setup of component circadian_lighting
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 256, 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: local variable 'k' referenced before assignment
The text was updated successfully, but these errors were encountered: