Circadian Lighting [Custom Component]

Hi! And first of all, this is a really neat component, thank you!

I’m having this issue where brightness control stops working, and all of the lights stay at 100% brightness. Color temp change works just fine. When I’ve reinstalled Hassio, reloaded the config, placed the same files in the custom components location, it has returned to working fine again… so I’m starting with ruling those out.

Any ideas – did I miss something obvious in this comment thread? Thanks a bunch!

Brightness should be at max_brightness from sunrise to sunset, and will only change brightness level from sunset to sunrise. This is not the behavior you’re seeing?

Will the period of max_brightness shift with sunrise_offset and sunset_offset?

It should, yes

Sorry if this has been covered - I’ve searched and haven’t found an answer.

When disabling a switch for Circadian Lighting, what’s the easiest way to restore the previous brightness/color settings for the lights_ct which are included in that switch?

Example Workflow:
User sets lights to 80% brightness, color = green.
Turn on the switch at 10:00 PM, Circadian Lighting kicks in and sets the light accordingly.
Turn off the switch at 10:30 PM - I want light to go back to 80% brightness, color = green.

You might want to look at this

Hi all,

I have integrated the custom component, and it works really well.
The only issue I have is when I wake up in the morning.

I use the sleepcycle app on my phone that controls the Hue lights in my bedroom.
But as soon as sleepcycle turns the lights on, after about 2 seconds or so circadian lighting takes over and adjusts the brightness and color.
I would like to switch of the function of the component for a certain light or group, are there any suggestion on how to accomplish this.

Best regards

Jordy

I actually do the same thing. I handle it by having Home Assistant turn off the Circadian Lighting switch for my bedroom lights when I put HA into “night mode” - that way the alarm app on my phone can slowly brighten my lights without interference of CL. Then, when I dismiss my alarm and Home Assistant leaves “night mode” HA turns the Circadian Lighting switch on.

I have 4 different light groups.

Light.bedroom
Light.living
Light.kitchen
Light.toilet

Let’s say in the morning a want to have sleepcycle to regulate the light. But at the same time use circadian lighting to control the rest of the light groups. Then when I turn of my alarm, circadian lighting takes over controlling all 4 groups.

To night for example a wanted to watch a movie in the living area. So I needed to switch of circadian lighting for all groups. I would be awesome if a just could turn of the circadian light for the living and keep the other groups in affected.

I hope I’m a bit clearer in what I mean :sweat_smile:.

Regards Jordy

You can do that, you can define as many CL switches as you want, each one can have one or more lights. I have a different CL switch defined for each light fixture in my house.

Aha now I understand.

I will try that, let you know if I need any help.

Thanks

Somebody appears to be reporting memory leaks with the component, is that something known?

It is not, I’ve not experienced this myself - is there anyone else with this issue?

I’m not sure. Here’s a memory-graph of my Hassio VM:


After the large steps (changes, updates) I can see a slight upgoing trend.

Hi all - I’m a noob to Home Assistant but am up and running on a RPi 3b+. I’m looking to install Circadian Lighting but am unsure where I’m stuck. Appreciate any and all guidance. Steps I’ve taken:

  • Created a new folder in the same place as my configuration.yaml and called it custom_components
  • Added the 3 Circadian Lighting scrips to that folder.
  • Updated my configuration.yaml with the following:
python_script:
circadian_lighting:
switch:
  - platform: circadian_lighting
    lights_ct:
      - light.swoopy_light

Specific error I am getting:

2019-09-15 15:38:25 ERROR (MainThread) [homeassistant.components.hassio] Component error: circadian_lighting - Integration circadian_lighting not found.
Platform error switch.circadian_lighting - Integration circadian_lighting not found.

What am I missing? And apologies for still getting a hold on things.

Within custom_components, create another folder called “circadian_lighting”. Copy the installation files into this new folder. Restart HA.

1 Like

thanks. that did it.

I’m not seeing my Phillips Hue bulbs change and can use some help figuring out what’s wrong. Appreciate any insight.

Here’s my configuration.yaml:

circadian_lighting:

switch:
  - platform: circadian_lighting
    name: "double_AA_ct"
    lights_ct:
      - light.swoopy_light
      - light.office_lamp_shade

and here’s the latest log:

`2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] now: 2019-09-17 07:25:48.010442-04:00
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] Astral location: name/region, tz=Europe/London, lat=40.68, lon=-74.01
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] today_sun_times: {'sunrise': datetime.datetime(2019, 9, 17, 11, 38, 17, tzinfo=<DstTzInfo 'Europe/London' BST+1:00:00 DST>), 'sunset': datetime.datetime(2019, 9, 18, 0, 3, 8, tzinfo=<DstTzInfo 'Europe/London' BST+1:00:00 DST>), 'solar_noon': datetime.datetime(2019, 9, 17, 17, 50, 42, tzinfo=<DstTzInfo 'Europe/London' BST+1:00:00 DST>), 'solar_midnight': datetime.datetime(2019, 9, 17, 5, 50, 27, tzinfo=<DstTzInfo 'Europe/London' BST+1:00:00 DST>)}
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] now_seconds: 1568719548.010442
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] sunrise_seconds: 1568716697.0
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] sunset_seconds: 1568761388.0
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] solar_midnight_seconds: 1568695827.0
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] solar_noon_seconds: 1568739042.0
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] h: 1568739042.0
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] k: 100
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] x: 1568716697.0
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] y: 0
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] a: -2.0028078364463059e-07
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] percentage: 23.890172049366328
2019-09-17 07:25:48 DEBUG (SyncWorker_2) [custom_components.circadian_lighting] Circadian Lighting Component Updated
2019-09-17 07:25:48 DEBUG (SyncWorker_17) [custom_components.circadian_lighting.switch] double_AA_ct Switch Updated
2019-09-17 07:25:48 DEBUG (SyncWorker_3) [custom_components.circadian_lighting.sensor] Circadian Lighting Sensor Updated
2019-09-17 07:25:48 DEBUG (SyncWorker_17) [custom_components.circadian_lighting.switch] double_AA_ct off - not adjusting`

Based on the last line in the log, it looks like the switch.double_AA_ct entity is turned off.

Ah ha. Thanks. Is there a way to write it into configuration.yaml to simply permanently turn it on? Or is the correct way to enable it simply through calling it as a Service through the UI?