Circadian Lighting [Custom Component]

Thanks for your reply, will try the automation then ! :slight_smile:

Hi Community,
I am using this Component for a while and I love. Just about a month ago or so i updatet my Home assistan installation. Since then the component is not working for me anymore.
I actually didn’t change anything…
On restart i get the following notification:

The following integrations and platforms could not be set up:

Please check your config.

The log says the following:

Protokolldetails ( ERROR )

Logger: homeassistant.setup
Source: setup.py:298
First occurred: 19:41:10 (1 occurrences)
Last logged: 19:41:10

Unable to prepare setup for platform circadian_lighting.sensor: Unable to set up component.

I have tried reinstalling the component several times, manually and via HACS.
I always get the mentioned error.
Does anybody have an idea what happend? (And maybe what i can do?
My config is complete simple by now:
circadian_lighting:
and

switch:
  - platform: circadian_lighting
    name: "WohnzimmerCL"
    lights_ct:
      - light.esstisch
      - light.kommode
      - light.schlafzimmer_decke

I am using home assistant (0.112.1) in a python virtual environment on my raspberry along with Deconz.

An help is apreciated! Thanks!

Does version 1.0.11 work properly for you?

1 Like

I changed to that version just a minute ago and it seems to work. At least i havent any error message an the circadian values are showing up again.
Whatever changed, or whatever i did do wrong: Now its working again!
Thanks for your help!

Edit:
Actually I changed the content of the files manually using 1.0.11 files wich you provided in the link.
But HACS shows 1.0.13. I’m not sure if this is important, but as mentioned: I do get the values shown.
Even though non of my lights seems to react. they dont change Colortemp or brighntess. I will be checken that this evening.

1.0.13 is the latest but it adds a dependency to properly handle timezone differences. It seems like your setup isn’t properly installing timezonefinder.

As you can see here:
cl_values|458x500
The values are beeing calculated. an as far as I can say they seem to be right.
THis is orking since I replaced the already installed files with the ones you linked in your previous post.
This is my config:

circadian_lighting: 
switch:
  - platform: circadian_lighting
    name: "WohnzimmerCL"
    min_brightness: 20    
    lights_ct:
      - light.esstisch
      - light.kommode
      - light.schlafzimmer_decke
    lights_brightness: 
      - light.couch
      - light.sessel
      - light.kuche_decke_1
      - light.kuche_decke_2
      - light.kuche_decke_3
      - light.flur_1
      - light.flur_2
      - light.bad_decke

But none of the lights is reacting. It worked perfect just some months ago.
Ca I try to do somethin on that timezonefinder-problem?

Hi. I am just looking for a suggestion on how to handle a particular scenario. I have a set of lights configured that adjust both the color temp and brightness. Periodically I need to stop the lights from adjusting brightness, but I still want them to adjust the color temp.

I did consider setting up 2 switches, with the same set of lights on both, but disable the brightness adjustment on one of the switches. And then toggle one on and one off depending which scenario I want. But I just thought i’d see if there was a better way.

Cheers.

To be sure, the Circadian Lighting switches are on? You should start by enabling Debug Logging and see if there’s anything helpful shown there.

For the time being, setting up two CL switches is the best option.

Actually I cant find the switch anywhere. Shouldn’t it at least show up on the developer tools/states page?
So I cant really tell, if its on… or if it even existes…
I searched the logfiles, an at least from what I can find there is only some warnings regarding missing translation files.
Here is the complete Log, Here is just the lines containing “circadian”

I have no idea what to look for. As is said: The sensor is showing values. but thats quite all.

Yes there should be switch.circadian_lighting_[...] entities that you can get to from the states page (I haven’t had the time to convert this to an integration so that they show up on the entities page yet). I don’t see anything in your log indicating an issue so not really sure what’s going on…

Well i double checked that: There is no such switch. That should be whre the problem comes from. I will reinstall maybe tomorrow and try again. Thanks!

Ok cheers.

FYI:
What I did just a moment ago:
I completetly deleted all CL-related config in my config.yaml
I deleted the “custom_componensts\circadian_lighting” folder.
I rebooted my raspberry

Then I reinstalled 1.0.13 via HACS.
The files showed up where they should.
I added a small basic config, and restart.
Then I get the old error message:

The following integrations and platforms could not be set up:

Please check your config.

So i uninstalled everything and reloaded version 1.0.11 -as you suggested-, using HACS again.
I added a small config and there is no error anymore, the sensor shows up and shows the calculated values. But i do not find any switch on entities states page.
So basically many uninstalls an reinstalls have brought no succes.
I appreciate your help very much, so if you or anyone else has an idea, what I could do or check, plase let me know!

What config did you use in this test?

circadian_lighting: 
[...]
switch:
  - platform: circadian_lighting
    name: "WohnzimmerCL"
    min_brightness: 20    
    lights_ct:
      - light.esstisch

That looks right…unfortunately I haven’t got a clue why it isn’t working for you. I can make up a version with even more debug logging for you to try but I’m not sure when I will have time for that. Maybe someone else will see something I missed in the meantime. :crossed_fingers:

IT IS WORKING AGAIN!
I actually have no idea why it didnt but this was my solution:

  • upgraded Home Assistant to 0.113.3.
  • Install CL 1.0.13 —> DIND’T WORK. “Couldn’t set up Custom Comonent, sensor and switch” —> Uninstalled CL
  • installed CL 1.0.11 —> WORKED

Thanks for all the hints!

1 Like

Awesome! If you want to be able to use the lastest you likely just need to manually install timezonefinder. This is supposed to happen automatically but something with your setup is probably keeping that from happening as it should.

Finally it is completly working. CL 1.0.13 on HA 0.113.3
If anyone might get the same problem as me::
I am using Home assistant in a python virtual Environment. The Problem seemed to be the missing timezonefinder. So I installed it manually. The problem still occured.
Studying my logs I found a further Error with “numpy”.
I reinstalled Numpy on raspbian AND inside the VENV an now i finally have an errorfree Circadian Lighting!