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

some errors on a new install of this component #9

Closed
ctrl50 opened this issue Oct 13, 2020 · 2 comments
Closed

some errors on a new install of this component #9

ctrl50 opened this issue Oct 13, 2020 · 2 comments

Comments

@ctrl50
Copy link

ctrl50 commented Oct 13, 2020

Just installed it as shown in your reddit video. Set the sunrise and sunset times, and added a couple lights.

Lights arent changing at all. and giving these erorrs. not really sure how to proceed since the times I set are correct.

edit: Also switch.adaptive_lighting_testing is Unavailable

Oct 13 15:44:50 server hass[5180]: 2020-10-13 15:44:50 ERROR (MainThread) [custom_components.adaptive_lighting.switch] testing: The sun events ('sunset', 'solar_noon', 'sunrise', 'solar_midnight') are not in the expected order. The Adaptive Lighting integration will not work! This might happen if your sunrise/sunset offset is too large or your manually set sunrise/sunset time is past/before noon/midnight.
Oct 13 15:44:50 server hass[5180]: 2020-10-13 15:44:50 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Oct 13 15:44:50 server hass[5180]: Traceback (most recent call last):
Oct 13 15:44:50 server hass[5180]:   File "/home/ctrl/.homeassistant/custom_components/adaptive_lighting/switch.py", line 739, in _light_event
Oct 13 15:44:50 server hass[5180]:     await self._update_attrs_and_maybe_adapt_lights(
Oct 13 15:44:50 server hass[5180]:   File "/home/ctrl/.homeassistant/custom_components/adaptive_lighting/switch.py", line 650, in _update_attrs_and_maybe_adapt_lights
Oct 13 15:44:50 server hass[5180]:     self._settings = self._sun_light_settings.get_settings(
Oct 13 15:44:50 server hass[5180]:   File "/home/ctrl/.homeassistant/custom_components/adaptive_lighting/switch.py", line 927, in get_settings
Oct 13 15:44:50 server hass[5180]:     percent = self.calc_percent()
Oct 13 15:44:50 server hass[5180]:   File "/home/ctrl/.homeassistant/custom_components/adaptive_lighting/switch.py", line 890, in calc_percent
Oct 13 15:44:50 server hass[5180]:     today = self.relevant_events(now)
Oct 13 15:44:50 server hass[5180]:   File "/home/ctrl/.homeassistant/custom_components/adaptive_lighting/switch.py", line 878, in relevant_events
Oct 13 15:44:50 server hass[5180]:     events = [
Oct 13 15:44:50 server hass[5180]:   File "/home/ctrl/.homeassistant/custom_components/adaptive_lighting/switch.py", line 879, in <listcomp>
Oct 13 15:44:50 server hass[5180]:     self.get_sun_events(now + timedelta(days=days)) for days in [-1, 0, 1]
Oct 13 15:44:50 server hass[5180]:   File "/home/ctrl/.homeassistant/custom_components/adaptive_lighting/switch.py", line 872, in get_sun_events
Oct 13 15:44:50 server hass[5180]:     raise ValueError(msg)
Oct 13 15:44:50 server hass[5180]: ValueError: testing: The sun events ('sunset', 'solar_noon', 'sunrise', 'solar_midnight') are not in the expected order. The Adaptive Lighting integration will not work! This might happen if your sunrise/sunset offset is too large or your manually set sunrise/sunset time is past/before noon/midnight.


@basnijholt
Copy link
Owner

Hmm, did you read the error message?

ValueError: testing: The sun events ('sunset', 'solar_noon', 'sunrise', 'solar_midnight') are not in the expected order. The Adaptive Lighting integration will not work! This might happen if your sunrise/sunset offset is too large or your manually set sunrise/sunset time is past/before noon/midnight.

If you did not manually set the sunset and sunrise (with offsets), please tell me how you configured the integration.

@basnijholt
Copy link
Owner

This is the same issue as #7, let's continue there.

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