thanks - I figured it out… somehow my fixed ip addresses got overwritten on my router… I updated it and now all is well. thanks!
I just pushed 1.0.10 - it is a hotfix for malformed services.yaml causing crashes with Home Assistant Android app (and who knows what else). I strongly encourage everyone to update to this version to prevent issues.
I know there are a few open pull-requests and features that users are waiting for. I plan on going through those as soon as possible but wanted to push this fix through because it’s causing relatively major issues for users and other developers.
I’ve successfully set up Ciracian Lighting.
I’m not sure if I missed it, but is there a way to customise the brightness curve (independent of color temperature)?
I’m happy with the color temperature curve, but I’d like to decrease the brightness faster in the evening.
Hi all,
@claytonjn thanks a lot for your work, I’ve been using your component for months now, it has became a musthave for the wife and I.
I’m facing a strange issue, but I’m not sure it’s directly linked to the circadian component (this is why I’m not opening a github issue yet).
I have several circadian switches that are controlled by an input boolean (disable_entity). The configuration for each switch is the same. Here’s a bit of the config file (which has been working for 6+ months):
# ------------------------------------------------------------------------------
# 0. Anchors
homeassistant:
customize:
package.node_anchors:
circadian_switch_config: &circadian_switch_config
platform: circadian_lighting
sleep_entity: input_boolean.sleep_mode
sleep_state: 'on'
min_brightness: 60
sleep_brightness: 25
sleep_colortemp: 2000
disable_entity: input_boolean.circadian_general_switch
disable_state: 'off'
# ------------------------------------------------------------------------------
# 1. Circadian lighting component
circadian_lighting:
min_colortemp: 3000
max_colortemp: 5500
latitude: !secret ha_latitude
longitude: !secret ha_longitude
switch:
# ----------------------------------------------------------------------------
# 2a - Circadian lighting switch living room
- name: livingroom
lights_rgb:
- light.philips_hue_lightstrip_1
- light.philips_hue_bloom_1
- light.philips_hue_iris_1
- light.philips_hue_color_bulb_3
- light.philips_hue_color_bulb_5
- light.philips_hue_color_bulb_6
- light.philips_hue_color_bulb_13
- light.philips_hue_color_candle_1
<<: *circadian_switch_config
# ----------------------------------------------------------------------------
# 2b - Circadian lighting switch corridor
- name: corridor
lights_rgb:
- light.philips_hue_color_bulb_8
- light.philips_hue_color_bulb_9
- light.philips_hue_color_bulb_10
<<: *circadian_switch_config
# ----------------------------------------------------------------------------
# 2c - Circadian lighting switch bedroom
- name: bedroom
lights_rgb:
- light.philips_hue_color_candle_2
- light.philips_hue_color_candle_3
- light.philips_hue_color_candle_4
<<: *circadian_switch_config
Problem: For a few weeks now (after 0.015 update I think), when I turn off the light in the bedroom, it turns back on if the circadian switch is on. There are two ways to prevent this :
- Turn off circadian, turn off bedroom, turn on circadian.
- Turn off bedroom twice quickly.
Currently, I don’t have a clue about what’s causing this unwanted behavior. I’m not sure it’s related to the circadian component, but it looks like it might.
-> Have you guys faced a similar issue ?
-> Would you have any recommandation about how to solve or investigate the problem ?
Thanks for any help you can provide !
Cheers
Currently the only adjustments for the curve are sunrise and sunset, max colortemp and min brightness - sunrise and sunset affect both temperature and brightness.
Basically, the brightness curve is parabolic with “x-intercepts” at sunset and sunrise and the vertex at min brightness. In order to allow for manipulating the brightness curve independent of color temperature additional points would be needed and it starts getting complex for the programming but also for the configuration by the user. If you have any suggestions how this could be implemented in a way that is easy for users to understand I can look into it.
Usually this happens when the state of the light in HA quickly goes off>on>off - CL watches for lights turning on so it then sends an adjustment which turns the lights back on. I have a better explanation of this in part 2 here: https://github.com/claytonjn/hass-circadian_lighting/wiki/Frequently-Asked-Questions#q-why-cant-i-turn-off-my-lights-after-configuring-them-with-circadian-lighting
Are your Hue lights connected to a Hue bridge, or are you controlling them a different way?
PS: Have you tried configuring your CL switches with the lights under lights_ct
rather than lights_rgb
? CL calculates everything in colortemp so RGB adjustments are basically using a formula to calculate an approximate representation of what the colortemp would be using R, G, and B pixels rather than white pixels. I know it’s confusing, but lights_rgb
should really be used for RGB only lights, lights_ct
should be used for RGBW lights like Hue.
Thanks for your feedback ! I’m switching to lights_ct
as you suggested. To be honest, I did not think of it that much when I installed the plugin. It’s been working flawlessy since then.
I’m using a Hue bridge to control my lights.
I read the FAQ you shared and actually, now that I think of t, my issue might be related to item 1. My bedroom is the only place in my house where I’ve setup an ‘entertainment area’ using the hue app. I removed it a couple of days ago, when the issues started to occur, but maybe there’s some kind of entity that stays on in HA, or something like that. This is quite strange.
If you’re using the Hue bridge then it probably isn’t that second point - I have over 50 lights on my Hue bridge and they all work perfectly with CL.
The group issue may be more likely. How exactly are you turning off the light in the bedroom when the issue occurs with the lights turning back on?
BTW, if you follow the steps here you can watch the logs and confirm if it is in fact CL causing the lights to turn back on: https://github.com/claytonjn/hass-circadian_lighting/wiki/Debugging
you can watch the logs and confirm if it is in fact CL causing the lights to turn back on
I missed that one, this will be useful !
How exactly are you turning off the light in the bedroom
I’m using several ways, same reult for each one when circadian is on. All methods turn off the HA light that corresponds to the hue group defined in the hue app :
Methods are
- Alexa command
- Home assistant button
- Hue remote
Same result for each one. Light turns back on when circadian is on. I initially thought that this was related to the hue group, but the other rooms are setup the same way and it’s been working very nicely.
I just realized, maybe I should change this
- name: bedroom
lights_rgb:
- light.philips_hue_color_candle_2
- light.philips_hue_color_candle_3
- light.philips_hue_color_candle_4
<<: *circadian_switch_config
to this
- name: bedroom
lights_rgb:
- light.hg_bedroom
<<: *circadian_switch_config
Yes, if you always control the lights as a group then it’s best to configure the group in CL rather than the individual lights (fewer service calls and everything stays in sync better). I would start by turning on logging and also change the configuration to the group as you said and see if the results are better.
Thanks a lot for your help ! I’ll update my config tonight, hopefully this is it !
Thanks.
Could I manipulate the curve for both CT and Brightness together? A steeper gradient.
An alternative I haven’t tried yet it just off-setting sunset to it kicks in earlier. My only gripe with the system is that it’s too bright for too long after sunset.
Reporting back :
- Using
hue_groups
instead of individual light entities fixed the issue of light turning back on in the bedroom. It also looks that the changes are faster and more uniform now (previously there was a small offset between each light adjustment in the same room). -
lights_ct
is working fine as well, though it seems that the saturation has been reduced a bit. I’ll check again tonight, but the lights appear to be less warm in the evening, and are definitly colder in sleep mode. i guess adjustments are needed, or I’ll switch back torgb
.
Thanks for your help !
Like I said, the only way to adjust the curves is sunrise/sunset/max colortemp/min brightness. Adjusting sunrise/sunset will result in one of the curves becoming less steep at the other gets more steep. Raising max colortemp will result in a steeper colortemp curve, and lowering min brightness will result in a steeper brightness curve.
I’ve not found a good formula that correlates natural light levels with angle of the sun below the horizon, so parabolic dimming is the best I can do. Anything else would require the user to configure multiple brightness levels and different points which is completely impractical. Most people right now are actually complaining that lights are dimming too quickly because the sun sets early in the winter months.
Your best option may be to disable brightness adjustments from CL and use a separate automation to achieve what you are looking for to your exact needs.
Yes that has been my experience as well. My rule of thumb is that if there are multiple bulbs in a fixture only control the group (CL, voice, app, etc.) but keep each fixture as a separate entity in CL etc.
There will be slight variation because the RGB conversion is estimated. The lights_ct
behavior is actually more accurate though and if you’re using CL for the intended purpose of following natural lighting you’re better off sticking with lights_ct
even if it doesn’t look as “good.”
Is there any way to automatically disable circadian lighting when I manually change the light myself? I love the component, but sometimes you want to overwrite the value. But I have to disable it, and then change the light. It would be nice if this can be done automatically. The WAF would go up a lot.
I’m thinking about doing something with an automation but I don’t know how to get started…
Anyone having suggestions?
It really depends on how you manually change the light. Is it through lovelace, by voice, through a separate app, a physical switch, etc.? One of the proposed enhancements is a threshold setting that would disable CL if the lights are too far away from what they should be (i.e. if you make them blue). That would likely solve that issue but I have yet to implement that functionality.
I will change it with all the options
That threshold setting would be great!!
A couple of days ago I began to make a research.
These automations can work well for this purpose (thank you Tinkerer at HomeAssistant Discord, for your help): https://hastebin.com/wawulejuwe.cs
One automation activates Circadian stuff when lights go on, and second one deactivates it when you change the color of the lights.
I think I have to change some things of the code (using hue [0] and saturation [1], and not just hue [0] and hue [0]).
I’m working on this second one https://hastebin.com/ofevasohir.pl
The Idea of the second one is combining it with your automation, claytonjn https://github.com/claytonjn/hass-circadian_lighting/issues/3#issuecomment-587489634 , which updates a Hue Scene (I called it Circadian) with the Circadian values. So, when I set the scene with the Circadian values then the Circadian switch should be switched on.
The thing is that I cannot make the second one work. I’m not good as a programmer and I just think it doesn’t work due to this bug -> https://github.com/home-assistant/home-assistant/issues/20672
It would be so nice if we could find a solution.
Hi @CM000n
I’m testing this plugin.
I have a really simple conf at the moment to see how it work
switch:
- platform: circadian_lighting
lights_ct:
name: circadiane
- light.sopra
when I try to test the Configuration validation I get the following error
Invalid config for [switch.circadian_lighting]: Entity IDs can not be None for dictionary value @ data['lights_ct']. Got None. (See ?, line ?).
It is similar to the post n. #540 but here I don’t have any strange character in my entity name
could you help me pls?