Just tried the adaptive lighting integration, and the Issue is that the previous setting is loaded first, so at night it is not usable for me, you are first blinded, then the light sets to lower brightness.
What a great automation. I added it to my home and it makes everything so much easier. It works even with the porch light and across our home we don’t have to worry about choosing the right combination. Each time. 😊
@@chazM6116 so? you probably can set all lightbulbs to same calvin, will they glow the same color for different vendors? I doubt that. I have 3 sets of different models of Xiaomi e27 lightbulbs in chandeliers and its colors is different. need to replace bunch of inconsistent lights :(
Same here. Was wondering why the adaptive lighting integration was not used, as it’s much easier to setup and works actually quite a bit better than the above.
I'm using SmartThings for now, but I'm supposed to get my Home Assistant Yellow in January. I'm saving many of your videos for use for then, but what I love is when I can use the same ideas in SmartThings, now. For example, your light notification of your laundry status really helped me make mine work, and while I can't use HACS, I can use color templates based on the time of day and set them up for my system to use. Thank you!
The template sensor is a great idea, but Home Assistant can also do a lot of this with Action Condtions in the Automation instead of needing to create additional sensors. I stopped using set times for a lot of my light automations. Instead I started using the sun elevation. Not perfect still, but it eliminated some of the restrictions of time based automations. One of the great things about Home Assistant. There are many different ways to do the same thing. It can be complex, or simple :).
I think using a template sensor is better programming practice. It allows you to reuse these values in different automations so there is only one place to tweak. It also separates concerns
That's sweet. The other thing that I have done is to have different lighting based on whether my night time alarm [external doors are opened] is on or off. If it's on then the lighting is really subdued because everyone is [or should be] asleep. And if the night time alarm isn't on then the lighting is a bit brighter because people are probably still up.
Great ideas. I have been using HA for a few years now and template is on the learning list for me. Your example for lighting was a really good example and will bump up the ranking to learn about templates higher on the list.
I like your automation for hall lighting, I do similar with the kitchen and counter lights, as over night or late evening I'm normally just putting the kettle on or need a glass of water so the counter light strips are ideal
@@HomeAutomationGuy it will be after my fp1 arrives to stop lights turning off when standing still by the oven cooking. Didn't want to extend the cool down to 10 mins and couldn't figure out code to start the cooldown at 1 min, and increase it the longer someone is in the room upto a limit.
Very interesting video. I already liked you automatic lighting before this, but this is even better. Winter in the Netherlands can be pretty dark too. I have to change some things around here. Perfect excuse to play with home automation.
As usual a another great video we can inspire from. I am not as skilled with coding so I did this the long way around by creating a "Daytime" toggle helper that flips based on sunset / sunrise . Will definitely look into the circadian integration, though I try to stay away from cluttering the configuration.yaml file as it is terrible to read if long.
Apparently people also prefer warmer lighting when the weather is colder, and colder lighting when the weather is warmer. So that might be something interesting to add.
I have something similar but I set the scene to all the lights on the sun height. That way it works all year round. Time isn't a reliable way to do it in my finding. I do this by having a template that tracks what scene the lights should follow. This also means I can get the scene to change on all the lights when the template changes not just when the light is turned on.
Alan, awesome video. Im currently using Adaptive Lighting, which looks very similar to circadian lighting. However, can I use an automation (sensor) with the AL integration? Otherwise AL keeps the lights On.
Works fine here with automations using either light or motion/presence sensors. Just make sure to use the Adaptive Lighting 'apply' service to turn on the lights while applying the right color at the same time. With the regular light or device service lights often forgot to change to the right color.
Great video! You can also use elevation and azimuth atributes of Sun entity insted of Sun state. I use to used them for open or close blinds, before install a illuminance sensor.. Saludos.
@@HomeAutomationGuy Easy peasy! Elevation is how high from horizon is the sun, in degrees. Minor than 0° is below horizon, 90° is over our heads. Azimuth is the horizontal position. 0° is north, 90° is east, etc. :-)
Another great video! Just a question: I need multiple IFs in my case, as I need different light conditions during the day. I tried to define a new sensor like this, but I got a syntax error, what is the right syntax? light_color: friendly_name: 'Light Color' value_template: > {% if (now().hour >= 23) or (now().hour < 6) %} red {% elseif (now().hour >= 6) and (now().hour < 10) %} yellow {% elseif (now().hour >= 10) and (now().hour < 15) %} green {% elseif (now().hour >= 15) and (now().hour < 20) %} blue {% else %} orange {% endif %}
I always imagined a system that mimicked the brightness and color temperature of the outside suing a suite of photo sensors measuring color temp/brightness/cloudy conditions, with a manual override, of course.
The circadian plugin should do it. I've recently been using a new integration called Adaptive Lighting, which seems more powerful and supported. I'd suggest checking that out instead!
Anyone know how to tweak Adaptive Lighting so that it instantly changes to the right colour temperature after switching the bulb on? Mine normally changes around 20s later which can be a bit jarring if you last had the light on in the day, then switch on at night.
I'm only halfway in buuut this really seems like a reinvention of Adaptive Lighting... with the difference that this is time-based rather than position of the sun.
Not very 'Green' everything is on 24/7 :( Lights on in the day??? Do you have no windows? very rear do I put lights on in the day apart from the cloakroom with no windows
Is there a way to make this work in Sweden? I mean, the sun is up all night in the summer. We don't want bright light indoors in the middle of the night. In the winter it is the opposite, the sun isn't up much. We need bright light then.
Very interesting problem indeed. The sun entity has some State Attributes like elevation angle and if the sun is rising or not. Have you ever looked at that ? Of course this can also be combined with the time and light sensors. I live in the Netherlands and I also want my lighting to change with the seasons. It is not as extreme as is Sweden, but is still pretty dark in winter over here. So I also want very bright light in the morning and the afternoon in winter to mimic the sun.
There are a lot of variables to play with including offsets and min/max brightness. But in these cases I'd probably go manual with the template sensors and pick what works best for you, your location and your routine
There is an Adaptive Lighting Integration that works very well. Easy to set up.
Just tried the adaptive lighting integration, and the Issue is that the previous setting is loaded first, so at night it is not usable for me, you are first blinded, then the light sets to lower brightness.
@@theattorney6072 fixed in a recent version. It just keeps adapting, even if the lights are off (not via hardware switch of course).
Haven't looked the video yet but I was looking for this for a long time ! Thank you !
What a great automation. I added it to my home and it makes everything so much easier. It works even with the porch light and across our home we don’t have to worry about choosing the right combination. Each time. 😊
Glad it was helpful!
For years I used 222 temp everywhere. Boy I was shocked what a difference 300 temp does in the morning on a room with closed curtains. Thanks 😊
light is measured in Kelvin, Colour temperature generally ranges from 2700-3300K (warm) to 3300-5300 (cool) - and 6500K is daylight.
@@chazM6116 thats cool, but lightbulbs in HA have different scale
@@man4evil light is light no matter its source.
@@chazM6116 so? you probably can set all lightbulbs to same calvin, will they glow the same color for different vendors? I doubt that. I have 3 sets of different models of Xiaomi e27 lightbulbs in chandeliers and its colors is different. need to replace bunch of inconsistent lights :(
Any reason you are not using the "Adaptive Lighting" integration? Does exactly what you are trying to do, just a lot more user friendly to setup
Exactly what I was thinking within seconds of starting this video. Adaptive Lighting was a fork of Circadian Lighting, with a HEAP of improvements.
Nope - I'd never heard of it until now 😂. Guess I should take a look at it!
@@HomeAutomationGuy it’s the updated version of circadian lighting.
@@HomeAutomationGuy Please! do a video after testing that integration :D
Same here. Was wondering why the adaptive lighting integration was not used, as it’s much easier to setup and works actually quite a bit better than the above.
I'm using SmartThings for now, but I'm supposed to get my Home Assistant Yellow in January. I'm saving many of your videos for use for then, but what I love is when I can use the same ideas in SmartThings, now. For example, your light notification of your laundry status really helped me make mine work, and while I can't use HACS, I can use color templates based on the time of day and set them up for my system to use. Thank you!
I'm really glad that they're helpful!
marvelous! This is the aspect of my HA-setup I am not quite content with. This video, I'm sure, will help me 'fix' that! So thanks for sharing!
The template sensor is a great idea, but Home Assistant can also do a lot of this with Action Condtions in the Automation instead of needing to create additional sensors. I stopped using set times for a lot of my light automations. Instead I started using the sun elevation. Not perfect still, but it eliminated some of the restrictions of time based automations.
One of the great things about Home Assistant. There are many different ways to do the same thing. It can be complex, or simple :).
I think using a template sensor is better programming practice. It allows you to reuse these values in different automations so there is only one place to tweak. It also separates concerns
That's sweet. The other thing that I have done is to have different lighting based on whether my night time alarm [external doors are opened] is on or off. If it's on then the lighting is really subdued because everyone is [or should be] asleep. And if the night time alarm isn't on then the lighting is a bit brighter because people are probably still up.
Clever idea! I love it
Great ideas. I have been using HA for a few years now and template is on the learning list for me. Your example for lighting was a really good example and will bump up the ranking to learn about templates higher on the list.
Thank you for the blog.
I like your automation for hall lighting, I do similar with the kitchen and counter lights, as over night or late evening I'm normally just putting the kettle on or need a glass of water so the counter light strips are ideal
After a few days you stop noticing it, which means it's a perfect automation 😊
@@HomeAutomationGuy it will be after my fp1 arrives to stop lights turning off when standing still by the oven cooking. Didn't want to extend the cool down to 10 mins and couldn't figure out code to start the cooldown at 1 min, and increase it the longer someone is in the room upto a limit.
Very interesting video. I already liked you automatic lighting before this, but this is even better. Winter in the Netherlands can be pretty dark too. I have to change some things around here. Perfect excuse to play with home automation.
As usual a another great video we can inspire from. I am not as skilled with coding so I did this the long way around by creating a "Daytime" toggle helper that flips based on sunset / sunrise . Will definitely look into the circadian integration, though I try to stay away from cluttering the configuration.yaml file as it is terrible to read if long.
Thanks for sharing!
Apparently people also prefer warmer lighting when the weather is colder, and colder lighting when the weather is warmer. So that might be something interesting to add.
I think I prefer that too, but only just realised 🤣
Thanks for the suggestion
I have something similar but I set the scene to all the lights on the sun height. That way it works all year round. Time isn't a reliable way to do it in my finding. I do this by having a template that tracks what scene the lights should follow. This also means I can get the scene to change on all the lights when the template changes not just when the light is turned on.
Clever idea! Thanks for sharing!
Alan, awesome video. Im currently using Adaptive Lighting, which looks very similar to circadian lighting. However, can I use an automation (sensor) with the AL integration? Otherwise AL keeps the lights On.
Works fine here with automations using either light or motion/presence sensors. Just make sure to use the Adaptive Lighting 'apply' service to turn on the lights while applying the right color at the same time. With the regular light or device service lights often forgot to change to the right color.
Tonight is my first night trying sunset lights to help my sleep.
Great stuff. Are you using docket version?
Yes I am
You could also do this with scenes and a time of day sensor.
Great video!
You can also use elevation and azimuth atributes of Sun entity insted of Sun state.
I use to used them for open or close blinds, before install a illuminance sensor..
Saludos.
Thanks for sharing Luis! I unfortunately am not smart enough to understand how those things really work....
@@HomeAutomationGuy
Easy peasy!
Elevation is how high from horizon is the sun, in degrees. Minor than 0° is below horizon, 90° is over our heads.
Azimuth is the horizontal position. 0° is north, 90° is east, etc.
:-)
Another great video! Just a question: I need multiple IFs in my case, as I need different light conditions during the day. I tried to define a new sensor like this, but I got a syntax error, what is the right syntax?
light_color:
friendly_name: 'Light Color'
value_template: >
{% if (now().hour >= 23) or (now().hour < 6) %}
red
{% elseif (now().hour >= 6) and (now().hour < 10) %}
yellow
{% elseif (now().hour >= 10) and (now().hour < 15) %}
green
{% elseif (now().hour >= 15) and (now().hour < 20) %}
blue
{% else %}
orange
{% endif %}
Isn't it 'elif' not 'elseif'?
@@eugsmiley Yes, it is! Thanks!
Surely the times should be based off the sunrise/sunset .. what happens in winter etc?
I always imagined a system that mimicked the brightness and color temperature of the outside suing a suite of photo sensors measuring color temp/brightness/cloudy conditions, with a manual override, of course.
Thought you were using Home Assistant as a docker container. How did you integrate HACS in your container?
The installation method is pretty similar for HA OS and container.
@@HomeAutomationGuy you are right. I just integrated HACS in my container a few days ago and it works like a charm.
Can I have this Technology. My Project is similar to this project sir . Can I know brief description about this
Yup
If I start using the circadian lighting plug in do i still need the colour temp sensor or am I correct in thinking this would remove the need for it?
The circadian plugin should do it. I've recently been using a new integration called Adaptive Lighting, which seems more powerful and supported. I'd suggest checking that out instead!
Anyone know how to tweak Adaptive Lighting so that it instantly changes to the right colour temperature after switching the bulb on? Mine normally changes around 20s later which can be a bit jarring if you last had the light on in the day, then switch on at night.
There's an "initial transition" setting when you press configure that is supposed to take care of that
I'm only halfway in buuut this really seems like a reinvention of Adaptive Lighting... with the difference that this is time-based rather than position of the sun.
Yep, I think Adaptive Lighting is the newer version of this.
love it very Monty python😆
I wish I was that hilarious! 🤣
Not very 'Green' everything is on 24/7 :( Lights on in the day??? Do you have no windows? very rear do I put lights on in the day apart from the cloakroom with no windows
I live in the UK. Windows don't really make much difference in the winter.
@@HomeAutomationGuy lol I live in UK so unless you're in a 300yr old cottage as I lived in some 15yr ago :)
can this be done without coding?
Try an integration called Adaptive Lighting. It does a lot of this
What about PWM flickering?
I'm not sure what that is, but I've not noticed any flickering with my Hue lights
Great video! I linked it in a new section "See also" in Adaptive-Lighting's README.
Is there a way to make this work in Sweden? I mean, the sun is up all night in the summer. We don't want bright light indoors in the middle of the night. In the winter it is the opposite, the sun isn't up much. We need bright light then.
Very interesting problem indeed. The sun entity has some State Attributes like elevation angle and if the sun is rising or not. Have you ever looked at that ? Of course this can also be combined with the time and light sensors. I live in the Netherlands and I also want my lighting to change with the seasons. It is not as extreme as is Sweden, but is still pretty dark in winter over here. So I also want very bright light in the morning and the afternoon in winter to mimic the sun.
There are a lot of variables to play with including offsets and min/max brightness. But in these cases I'd probably go manual with the template sensors and pick what works best for you, your location and your routine
I guess just use the settings for somewhere on the same longitude but nearer the equator. Like Poland or Croatia.