hass-circadian_lighting
hass-circadian_lighting copied to clipboard
2021.5.0
not work with new version 2021.5.0
Same as #148
I love this integration, I can't live without it! :-) Wat can I do to help? Also not working in 2021.5:
Error during setup of component circadian_lighting:
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 109, in setup
cl = CircadianLighting(hass, min_colortemp, max_colortemp,
File "/config/custom_components/circadian_lighting/__init__.py", line 139, in __init__
self.data['percent'] = self.calc_percent()
File "/config/custom_components/circadian_lighting/__init__.py", line 210, in calc_percent
today_sun_times = self.get_sunrise_sunset(now)
File "/config/custom_components/circadian_lighting/__init__.py", line 174, in get_sunrise_sunset
location = astral.Location()
AttributeError: module 'astral' has no attribute 'Location'
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 109, in setup
cl = CircadianLighting(hass, min_colortemp, max_colortemp,
File "/config/custom_components/circadian_lighting/__init__.py", line 139, in __init__
self.data['percent'] = self.calc_percent()
File "/config/custom_components/circadian_lighting/__init__.py", line 210, in calc_percent
today_sun_times = self.get_sunrise_sunset(now)
File "/config/custom_components/circadian_lighting/__init__.py", line 174, in get_sunrise_sunset
location = astral.Location()
AttributeError: module 'astral' has no attribute 'Location'
And concerning the version number: (that's easy to fix) ;-)
2021-05-05 23:56:20 ERROR (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'circadian_lighting'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'circadian_lighting'
I found a temporary solution until the issue with astral
is fixed. Just need to add the next lines into circadian_lighting
config:
sunrise_time: '06:00:00'
sunset_time: '20:00:00'
(change the time to average sunrise and sunset time in your area)
Thanks @aksyonov that works for now!
not a solution for countries in the north regions, light changes so fast most of the time, light extending 15-30 minutes pr day now
I tried this, but unfortunately it seems configuration.yaml does not support variables here:
sunrise_time: '{{ as_timestamp(strptime(state_attr("sun.sun", "next_dawn"), "")) | timestamp_custom("%H:%M:%S")}}' sunset_time: '{{ as_timestamp(strptime(state_attr("sun.sun", "next_dusk"), "")) | timestamp_custom("%H:%M:%S")}}'
Best addon and not working 😢
I tried this, but unfortunately it seems configuration.yaml does not support variables here:
sunrise_time: '{{ as_timestamp(strptime(state_attr("sun.sun", "next_dawn"), "")) | timestamp_custom("%H:%M:%S")}}' sunset_time: '{{ as_timestamp(strptime(state_attr("sun.sun", "next_dusk"), "")) | timestamp_custom("%H:%M:%S")}}'
Yup, got an error as well. I hope we can work this out soon. This integration is a life saver!
For the time being you might try out the adaptive-lighting integration (see this PR in core.)
The code also lives here https://github.com/basnijholt/adaptive-lighting (add as custom repo to HACS).
This code is based on this integration and has some extra features.
For the time being you might try out the adaptive-lighting integration (see this PR in core.)
The code also lives here https://github.com/basnijholt/adaptive-lighting (add as custom repo to HACS).
This code is based on this integration and has some extra features.
@basnijholt How easy is it to migrate from hass-circadian_lighting
into adaptive-lighting
, or does it mean I have to configure everything from the scratch?
@kirbo
Depends on how heavily your configuration relies on certain concepts that differ between the two implementations. I read the documentation of adaptive-lighting and some concepts are different from circadian lighting - e.g. the "talking back control" thingy.
I implemented different automations/scenes/events to implement this feature with circadian lighting in my home assistant config, because this project just offers you the one switch to disable the automation. I think https://github.com/basnijholt/adaptive-lighting has put more effort in those use cases and you can control it better and more differentiated. I guess as adaptive-lighting will probably make it to core is one more reason to switch.
And finally this project seems to be unmaintained at the moment, because the issue is not really addressed. No front to @claytonjn though - we all know real life and work can make maintaining open source projects hard from time to time - so thank you very much for the idea & base implementation ❤️
I don't think this project has been updated in a very long time. I made the switch to Adaptive lighting, but I only was in trialing stage. The ability for Adaptive Lighting to disable itself based on manual control is helpful. Even if you use a voice assistant to change a light, there is a setting to stop Adaptive Lighting taking over again.
I will definitely give adaptive-lighting a try. Does anyone have experience using this with Ikea Tradfri bulbs? These have a known issue, that color temp and brightness can not be set in the same call.
I will definitely give adaptive-lighting a try. Does anyone have experience using this with Ikea Tradfri bulbs? These have a known issue, that color temp and brightness can not be set in the same call.
I figured it out myself: There is an option to control temp and brightness in two steps. Awesome!
I don't think this project has been updated in a very long time.
The dev has a Twitter account (https://twitter.com/claytonjn) which also shows a Facebook account (https://www.facebook.com/claytonjn). I don't have either but perhaps it's worth someone contacting him there directly.
Just use adaptive - lightning it is working perfectly
Replace init.py with this fix https://github.com/robertomano24/circadian_lighting/blob/master/custom_components/circadian_lighting/init.py until a new version is released.
Replace init.py with this fix https://github.com/robertomano24/circadian_lighting/blob/master/custom_components/circadian_lighting/init.py until a new version is released.
Thanks, but how to fix this issue: ModuleNotFoundError: No module named 'timezonefinder'
@robertomano24's solution works for me. Thanks!
@Xitro01: This should have been installed by HACS with the Circadian Lighting add-in. timezonefinder is listed as a dependency in manifest.json. Try this: remove the add-in (through HACS and config.yaml), restart Home Assistant, re-install the add-in (via HACS and config.yaml), replace __init__.py with robertomano24's version, then restart hass again.
Replace init.py with this fix https://github.com/robertomano24/circadian_lighting/blob/master/custom_components/circadian_lighting/init.py until a new version is released.
Thanks, but how to fix this issue: ModuleNotFoundError: No module named 'timezonefinder'
Yes, unfortunaly not working with docker out of the box.
@robertomano24's solution works for me. Thanks!
@Xitro01: This should have been installed by HACS with the Circadian Lighting add-in. timezonefinder is listed as a dependency in manifest.json. Try this: remove the add-in (through HACS and config.yaml), restart Home Assistant, re-install the add-in (via HACS and config.yaml), replace init.py with robertomano24's version, then restart hass again.
Replacing the manifest and restarting hass was enough, thanks!
I found a temporary solution until the issue with
astral
is fixed. Just need to add the next lines intocircadian_lighting
config:sunrise_time: '06:00:00' sunset_time: '20:00:00'
(change the time to average sunrise and sunset time in your area)
Worked for me! Would be great if we can get it working without the hack.
just use adaptive lightning, much better solution
Unfortunately, this repo looks like it's dead and abandoned
Here is a fork that works: https://github.com/robertomano24/circadian_lighting I will do my best to keep this fork updated to work with HA. It should be working now. You will need to add the files to your custom_components folder manually.
If you use Hue and want the Hue scenes you make to update with CL values for a seamless integration, check out my repo here: https://github.com/robertomano24/circadian_lighting-hue
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!
2.0.4-beta worked for me. As soon as HA finished restarting it picked up the lights again. Thanks for your work and congrats on the new puppy and job!
I'm out of town right now but I'll try it when I get home. Thanks!
Jim
Sent from my stupid work iPhone
On May 29, 2021, at 5:19 AM, David Thomas @.***> wrote:
2.0.4-beta worked for me. As soon as HA finished restarting it picked up the lights again. Thanks for your work and congrats on the new puppy and job!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
2.0.4 fixed it for me.
Got a handful of people confirming that 2.0.4 is working properly and no complaints about compatibility with HA Core 2015.5.x so I'm going to close this issue. Thanks everyone!