same problem with 0.81.2 here. keeping an eye out for your fix
Couple fixes:
- Fixed brightness to adjust when sleep mode is turned on
- Fixed sensor to load roperly with HA 0.81.2+ (@mouth4war, @roofuskit, @pg.sylvestre)
The following files were updated:
- config/custom_components/circadian_lighting.py
- config/custom_components/switch/circadian_lighting.py
Sorry about the delay in the 0.81.2 fix, I use Hass.io and it took a while for the build to be available.
Hi @claytonjn This component looks great. I have just set it up but was trying to understand exactly how it integrates with my existing lights and hoping you could help explain it please.
I have the below in a package called circadian_lighting.yaml
# https://community.home-assistant.io/t/circadian-lighting-custom-component/61246
circadian_lighting:
switch:
- platform: circadian_lighting
lights_rgb:
- light.ensuite_light
- light.bedroom_lamp
I have noticed that the following entities have been created upon HA restart:
sensor.circadian_values
switch.circadian_lighting_circadian_lighting
So in order to utilise this, do I just turn the lights on and off as normal and they will now be automatically set to the circadian values? or do I need to turn them on with a service call to include the circadian values?
It looks like it is time for my to ditch my very crude own custom component with this much better one. Couple of questions.
- how can you easily find out which lamps support ct, xy or rgb? Is HA not supposed to hide these details for us and work anyway?
- do you have a central place where I can find the latest most updated version of the 3 files? Or should I scroll down this post to find the most updated version?
- should we help pushing to make this a part of HA by starting a post in Feature Request requesting this to be a standard part?
Just turn the lights on and off as normal, and they will be automatically set - as long as the CL switch is on. However, âsmartâ lights typically turn on to their previous setting by default, which can result in a very brief transition to the correct circadian setting when first turned on. This can be eliminated by a turn_on service call with the color and/or brightness attributes from the sensor and switch, but is completely optional. I tried to build in as much flexibility as possible to handle all use cases. Also, note that you can have multiple switches defined with different grouping of lights to provide more flexibility.
HA is supposed to hide these details, but I decided to add the configuration options because itâs there in the Flux component and I figured more flexibility couldnât hurt. Also, I do have some lights that work with RGB/XY but not CT - I determined that with trial-and-error but you could also look at the code for every light integration you use, if youâre so inclined.
All of the links Iâve been posting go to the same address in GitHub, so the links in the first post or any in the thread will always post to the newest version unless I specifically state otherwise for some special case. I know I need a better system of versioning but Iâve been focusing on functionality.
Iâm completely open to supporting CL as a standard component, so anything you want to do to push that is fine with me!
Hello,
Since last night I upgraded HASS, the comoponent stopped working.
Log says that it unable to set up all depndencies:
Fri Nov 02 2018 08:45:24 GMT+0100 (közĂ©p-eurĂłpai tĂ©li idĆ)
Error during setup of component circadian_lighting
Traceback (most recent call last):
File â/usr/local/lib/python3.6/site-packages/homeassistant/setup.pyâ, line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File â/usr/local/lib/python3.6/concurrent/futures/thread.pyâ, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File â/config/custom_components/circadian_lighting.pyâ, line 106, in setup
load_platform(hass, âsensorâ, DOMAIN)
TypeError: load_platform() missing 2 required positional arguments: âdiscoveredâ and âhass_configâ
Fri Nov 02 2018 08:45:25 GMT+0100 (közĂ©p-eurĂłpai tĂ©li idĆ)
Unable to set up dependencies of switch.circadian_lighting. Setup failed for dependencies: circadian_lighting
Fri Nov 02 2018 08:45:25 GMT+0100 (közĂ©p-eurĂłpai tĂ©li idĆ)
Unable to prepare setup for platform switch.circadian_lighting: Could not set up all dependencies.
Anyone with the same issue, or is it just appeared in my instalaltion?
Tahnks!
Hello.
Just one day after deploying circa lighting in my appartment.
I want to use the sunrise and sunset offset but I have not figure it out the format of the offset.
One addition nice to have to improve from circadian lighting to advanced lighting would the ability to define scenes in the same module. Just would need to add the fixed brightness and colour (not just colour temperature but colour coodinates) in one switch and them from automations we would be able to toggle the switches to get what we want.
For instance if Iâm on the living room and the lights are on auto circadian ilumination and I want to see a movie then I would switch off the circadian lighting and switch on the movie lighting with movie settings.
Itâs currently a great piece of software that with some small additions would be awesome.
I will try to understand your coding (no experience in python) and try to improve to get what I want (no promises I get there anytime)
Thanks a lot
Sergi
I donât want the feature set of this component to start creeping outside the circadian concept - the beauty of the HA platform is that there are a lot of components with specific purposes that work together to overall create a robust system. There are many ways already that you can create scenes in HA (https://www.home-assistant.io/components/scene/) so you can already have an automation switch off CL and enable a scene. In fact, I have that exact setup triggered by my Harmony remote.
Thanks for the answer. What about the offset format?
Sorry! Should be 'HH:MM'
or 'HH:MM:SS'
. You can also add -
for negative offset.
Thanks a lot!!
Iâm facing issues with group of lights.
My lights come from deconz and, let me explain better my usecase
Letâs imagine a room with lights 1 and 2, deconz send light.room and light.1 and light.2
If I make circadian controls lights 1 and 2 I can turn on and off the lights on my room but then if I check light.room the brightness and colour doesnât match the ones from light1 and 2
If I make circadian controls light.room I can turn on perfectly but then turn off itâs a nightmare
My suggestion is to add an optional parameter on the switch to add a delay (letâs say in order of ms) to check lights status after a change. So when I turn off a group circadian waits to all the lights on the group are off.
Thanks again
I somewhat understand your issue, but not fully. Iâm also not sure I understand the request for a delay - are you suggesting that if a light group is configured in CL that CL check that each of the lights in the group are on before making an adjustment?
If a group is configured in CL and that group is off, CL should not be making any adjustments - delay or not.
I donât have any experience with deconz, but I use a lot of Hue lights with Hue groups. Iâve found it best to either use a group, or use individual lights, but not both. In my setup, if I have multiple bulbs in a fixture I ALWAYS use the group and completely hide the individual lights from HA (because I never want lights in a fixture to not match) however if I have multiple fixtures in a room I always address them individually and hide all room groups, because I may want fixtures in a room to be different.When you have light.1 and light.2 in CL does everything function correctly, and the only issue is that light.room doesnât show what light.1 and light.2 are set to? If so, could you explain why this would be a problem?
but I use a lot of Hue lights with Hue groups
Are hue groups or homeassistant groups? In my case are groups created by deconz imported by homeassistant
When you have light.1 and light.2 in CL does everything function correctly, and the only issue is that light.room doesnât show what light.1 and light.2 are set to? If so, could you explain why this would be a problem?
Yes it workes, the problem is if I check the status of light.room doesnât match with light.1 neither light.2
Hue groups.
So my question is; does that really matter? If the lights were set to different colors thereâd be no way of the group properly reflecting that so I would think in general looking at the status of a group would be pointless.
Also, Iâm still not really clear what the problem you had with using the group was. Does the issue occur when you turn the lights off outside of the group?
I think I need multiple disable_states to use with a media_player as disable_entity. Using disable_state âonâ doesnât catch states like paused, playing etc.
Edit: Not crucial as I am doing it using automations but a nice-to-have.
Does the issue occur when you turn the lights off outside of the group?
The issue is if I make cl control the group, if I try to turn off, after some attempts it will, but most of the time it turns on while bulbs are dimming off, so again they are on. As a workaround I have made an automation to capture the turn off, then switch off the related cl switch then turn off the light group, then wait 50ms, then turn on the related cl switch.
Good point, I could probably modify disable_state to take in a list so that you could input multiple values. Iâll try to add that at some point! Like you said, you can also use automations to turn off the switch for more complex situations.