Circadian Lighting [Custom Component]

I have Ecosmart bulbs from Home Depot and can confirm that the light/brightness transition is an issue for them too. It seems to only change brightness automatically and not color. I have them set up with ct.

Edit: It appears I cannot change the color consistently even manually in the UI because they are set up with a ZHA group. Not a CL issue.

Edit2: Resolved my issue. Turns out the issue is with groups in ZHA. Addressing each bulb in the CL configuration independently fixed my issues with CL.

anyone knows how to make it work on Philips Zhirui Smart Bulbs?

i have 4 bulbs which are yeelight and work perfectly, both brightness and color are adjusted.
on the other hand Philips Zhirui Smart bulbs donā€™t move, neither on brightness nor on color.
any clue? iā€™ve tried ct, rgb and xy but none work with the philips bulbs
thanks so much, nicola

configuration of lamps is:

  - platform: xiaomi_miio
    name: e14_salotto
[...]

yeelight:
  devices:
    192.168.1.75:
      name: Jimmy
[...]

configuration of circadian is like below.

circadian_lighting:
  min_colortemp: 1000
  max_colortemp: 10000
  interval: 180
  transition: 60

switch:
  - platform: circadian_lighting
    name: CircaYeelight
    lights_ct:
      - light.Jimmy
      - light.lampada_salotto_vicinotv
      - light.LuceGabry
      - light.LuceNick
      
  - platform: circadian_lighting
    name: CircaXiaomiE14
    lights_xy:
      - light.e14_salotto
      - light.e14_camera1
      - light.e14_camera2
      - light.e14_camera3

First: do you see any errors related to Circadian Lighting in Developer Tools --> Logs?
It might be that you max_- and min_colortemps are out of range. Not sure whether this will result in an error-message.

2nd, for testing, change transition to 0 or 1 (second). Then you will be able to see a change happen when you turn on a light. With 60 the change is too gradual to notice.

Does it only come up once after a reboot or consistently when CL tried to adjust? This can occur if CL tried to check the disable_entity after a reboot but that entity hasnā€™t been initialized yet. I need to update CL to properly handle this but have not had the time yet.

No, not just after a reboot.

I have several different switch.circadian_lighting configured and the error occurs whenever I turn those on to activate CL for that group of lights.

Of the six CL switches I have configured, the problem seems limited to two. Those two are unique in my setup in that they both:

  • Have a max_brightness configured.
  • Have a disable_entity that is a binary_sensor rather than an input_boolean.

Actually, now that I think about it, this raises another question. What is the purpose of the disable_entity if I can turn the CL switch on/off itself. Looking through my automations, sometimes I use the disable_entity and sometimes I also turn_off the CL switch. What the difference programmatically? should I use one or both?

disable_entity is a carryover from the Circadian Daylight SmartApp for SmartThings that I took over development of a few years ago. I included it in the HA integration for ease of configuration but I personally use automations to turn the CL switches on/off and Iā€™m probably going to remove that functionality altogether. Itā€™s extra work to maintain with no real benefit and I think it can be a lot more confusing because itā€™s not obvious that CL is disabled like the on/off of the switch. In fact, if I donā€™t have the time or knowledge to create a whole new domain for CL I might switch them from being switches to input selects so there would be a dropdown with something like on/off/sleep and remove the sleep_entity as well.

[Solved] I have trouble getting CL to work. My setup:

circadian_lighting:
switch:
  - platform: circadian_lighting
    name: Mit Helligkeit
    lights_ct:
      - light.lampe_schlafzimmer_dach_light
      - light.lampe_schlafzimmer_bett_light      
      - light.lampe_flur_light

However, the lights are not reacting to any CL adjustments.
Somehow, the lights do not show up in the CL switch:

The lights work nicely with e.g. Flux and can be controlled via the UI.

Got it to work, when I set up the lights with
lights_xy
However, this seems not to be right, since all configurations of the lights are using mired? Also flux works with mired setup.

For some unknown reason, after turning on debug log and switching back to lights_ct, it started working as expected.

Thanks for your work!

1 Like

Is anyone else getting this error message in logs since ha 0.110 ?

Protokolldetails ( WARNING )
Logger: homeassistant.components.switch
Source: components/switch/__init__.py:125
Integration: Schalter (documentation, issues)
First occurred: 21:26:35 (1 occurrences)
Last logged: 21:26:35

SwitchDevice is deprecated, modify CircadianSwitch to extend SwitchEntity

What can I do to resolve this?
Didnā€™t found anythiing regarding this error in the last release notes.
Sorry if I overlooked it.

4 Likes

Iā€™m getting the same error, also similar ones for ā€œBad Nestā€

Log Details (WARNING)
Logger: homeassistant.components.climate
Source: components/climate/__init__.py:547 
Integration: Climate (documentation, issues) 
First occurred: 20 May 2020, 19:58:24 (1 occurrences) 
Last logged: 20 May 2020, 19:58:24

ClimateDevice is deprecated, modify NestClimate to extend ClimateEntity

Isnā€™t it a warning and not an error?

1 Like

Yes, it is a Warning Message

Itā€™s a warning that can be ignored for now, itā€™s due to a change in 0.110 and thereā€™s already a PR open with a fix. Iā€™ve been too busy to get everything tested and merged but Iā€™m hoping to get to it this weekend!

4 Likes

Thanks claytonjn, itā€™s really appreciated :smiley:

I have a feature request for this integration:
Instead of using sunrise / sunset use a local illuminance sensor. Where I live (The Netherlands) we have daylight saving and also Sunrise is sometimes (at time of writing this) very early. Way earlier then actual light comes into my house due to tries, etc. Yes I can set an offset, but since it changes throughout the year Iā€™d have to re-set that offset. I would love to be able to use a illuminance sensor outside (which I already have) and set the min / max values for the integration to act upon that sensors value. Iā€™ve looked at the code for this integration, but Iā€™m just not enough of a programmer to get it to work.

Thanks for writing, sharing and supporting :slight_smile:
It seems though that my temp settings are ignored (Iā€™m probably doing something wrong :confused: ).
I have a cold to warm white light from Osram white supports 2700K - 6500K. Regardless of my config definition, the colour seems to be changing from very cold to somewhat warmer which matches the default settings of 2500K - 5500K.
I would like to have the both min and max temps a bit higher.

My config

circadian_lighting:
  max_colortemp: 6500 
  min_colortemp: 3500
  interval: 30
  transition: 25
  
switch:
  - platform: circadian_lighting
    name: "Bad"
    lights_ct:
      - light.lampe_bad
    min_brightness: 30
    max_brightness: 100

I just installed two zigbee RGBW led strips with Gledopto controllers.
The color is way off (way too blue) when used with Circadian Lighting. Everything is fine when set directly via HA or via Hue Essentials. I use them with deCONZ, if that makes a difference?
my Innr Bulbs are fine.
When I compare the state of the Innr bulbs with that of the RGBW strips, the values are identical.
Interestingly enough, the Innr bulbs and the RGBW strips Match each other nicely if I use flux instead of this component.

also tried stigvis fork and configured them as RGB lights, no difference unfortunately. any idea?

I could potentially add this but it would be a fair amount of work because the current implementation is time-based and calculated based on knowing a start/end time of the cycle. To be honest, what I really want is to find or develop a formula that calculates color temperature based solely on the angle of the sun above the horizon so that the min/max can change throughout the year.

@idofr @bernhard take a look at the logs, they might shed some insight: https://github.com/claytonjn/hass-circadian_lighting/wiki/Debugging

1 Like

Is there an trick to stop circadian switch if a service of an entity is run. I test Hue bulb, and iā€™d like if service: hue.hue_activate_scene is run stop circadian switch.
And If is it possible through the Hue app too.
Maybe a way to compare the CT set in sensor of circadian light and the new CT (or RGB) state of the bulb when it change ?

These are not possible, as far as I know.

A ā€œdifferential thresholdā€ has been proposed and it is something I plan on adding when I have time.