Automatic smart light brightness and color based on the sun

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 80

  • @FrankyB295
    @FrankyB295 2 года назад +9

    There is an Adaptive Lighting Integration that works very well. Easy to set up.

    • @theattorney6072
      @theattorney6072 Год назад +4

      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.

    • @DennisSchmitz
      @DennisSchmitz 7 месяцев назад +1

      @@theattorney6072 fixed in a recent version. It just keeps adapting, even if the lights are off (not via hardware switch of course).

  • @PierreLeroy76620
    @PierreLeroy76620 2 года назад +1

    Haven't looked the video yet but I was looking for this for a long time ! Thank you !

  • @SergioBlackDolphin
    @SergioBlackDolphin 7 месяцев назад

    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. 😊

  • @man4evil
    @man4evil 2 года назад +1

    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 😊

    • @chazM6116
      @chazM6116 Год назад

      light is measured in Kelvin, Colour temperature generally ranges from 2700-3300K (warm) to 3300-5300 (cool) - and 6500K is daylight.

    • @man4evil
      @man4evil Год назад

      ​@@chazM6116 thats cool, but lightbulbs in HA have different scale

    • @chazM6116
      @chazM6116 Год назад

      @@man4evil light is light no matter its source.

    • @man4evil
      @man4evil Год назад

      @@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 :(

  • @phil-jc8hp
    @phil-jc8hp 2 года назад +30

    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

    • @Sparky_D
      @Sparky_D 2 года назад +7

      Exactly what I was thinking within seconds of starting this video. Adaptive Lighting was a fork of Circadian Lighting, with a HEAP of improvements.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 года назад +18

      Nope - I'd never heard of it until now 😂. Guess I should take a look at it!

    • @BrianRoy86
      @BrianRoy86 2 года назад +1

      @@HomeAutomationGuy it’s the updated version of circadian lighting.

    • @AlonsoVPR
      @AlonsoVPR 2 года назад +1

      @@HomeAutomationGuy Please! do a video after testing that integration :D

    • @igiannakas
      @igiannakas 2 года назад +1

      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.

  • @suzithewitch
    @suzithewitch 2 года назад

    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!

  • @WPGinfo
    @WPGinfo 2 года назад

    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!

  • @EsotericArctos
    @EsotericArctos Год назад +1

    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 :).

    • @kmaid
      @kmaid Год назад +1

      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

  • @TheMoonSeesMe
    @TheMoonSeesMe 2 года назад

    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.

  • @andymok7945
    @andymok7945 2 года назад

    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.

  • @bat3332
    @bat3332 2 года назад

    Thank you for the blog.

  • @cyberdave17
    @cyberdave17 2 года назад

    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
      @HomeAutomationGuy  2 года назад

      After a few days you stop noticing it, which means it's a perfect automation 😊

    • @cyberdave17
      @cyberdave17 2 года назад

      @@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.

  • @wimderaat2993
    @wimderaat2993 2 года назад

    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.

  • @netblue
    @netblue 2 года назад +1

    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.

  • @iAmTheSquidThing
    @iAmTheSquidThing 2 года назад

    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.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 года назад +1

      I think I prefer that too, but only just realised 🤣
      Thanks for the suggestion

  • @hmonkey1
    @hmonkey1 2 года назад

    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.

  • @fearthesmeag
    @fearthesmeag Год назад +1

    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.

    • @DennisSchmitz
      @DennisSchmitz 7 месяцев назад

      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.

  • @Jessicab-u7c
    @Jessicab-u7c 4 месяца назад

    Tonight is my first night trying sunset lights to help my sleep.

  • @milicsantiago
    @milicsantiago 2 года назад +1

    Great stuff. Are you using docket version?

  • @Yama_1291
    @Yama_1291 2 года назад

    You could also do this with scenes and a time of day sensor.

  • @luisinigo5572
    @luisinigo5572 2 года назад +1

    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
      @HomeAutomationGuy  2 года назад

      Thanks for sharing Luis! I unfortunately am not smart enough to understand how those things really work....

    • @luisinigo5572
      @luisinigo5572 2 года назад

      @@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.
      :-)

  • @GagliardiPhotography
    @GagliardiPhotography Год назад

    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 %}

  • @deansproductions
    @deansproductions 2 года назад

    Surely the times should be based off the sunrise/sunset .. what happens in winter etc?

  • @sam5992
    @sam5992 Год назад

    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.

  • @EvolverDX
    @EvolverDX 2 года назад

    Thought you were using Home Assistant as a docker container. How did you integrate HACS in your container?

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 года назад

      The installation method is pretty similar for HA OS and container.

    • @EvolverDX
      @EvolverDX 2 года назад

      @@HomeAutomationGuy you are right. I just integrated HACS in my container a few days ago and it works like a charm.

  • @kancharisaibhanuprasadchar4424
    @kancharisaibhanuprasadchar4424 Месяц назад

    Can I have this Technology. My Project is similar to this project sir . Can I know brief description about this

  • @chrismills5470
    @chrismills5470 2 года назад

    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?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад +1

      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!

  • @cyberdave17
    @cyberdave17 2 года назад

    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.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 года назад +1

      There's an "initial transition" setting when you press configure that is supposed to take care of that

  • @davidc4162
    @davidc4162 Год назад

    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.

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад +1

      Yep, I think Adaptive Lighting is the newer version of this.

  • @Guygizbon-1
    @Guygizbon-1 2 года назад +1

    love it very Monty python😆

  • @chazM6116
    @chazM6116 Год назад

    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

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      I live in the UK. Windows don't really make much difference in the winter.

    • @chazM6116
      @chazM6116 Год назад

      @@HomeAutomationGuy lol I live in UK so unless you're in a 300yr old cottage as I lived in some 15yr ago :)

  • @joeblstrn
    @joeblstrn Год назад

    can this be done without coding?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад +1

      Try an integration called Adaptive Lighting. It does a lot of this

  • @axel9546
    @axel9546 2 года назад

    What about PWM flickering?

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 года назад

      I'm not sure what that is, but I've not noticed any flickering with my Hue lights

  • @BasNij
    @BasNij Год назад

    Great video! I linked it in a new section "See also" in Adaptive-Lighting's README.

  • @jfkgodk
    @jfkgodk 2 года назад

    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.

    • @wimderaat2993
      @wimderaat2993 2 года назад

      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.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 года назад

      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

    • @iAmTheSquidThing
      @iAmTheSquidThing 2 года назад

      I guess just use the settings for somewhere on the same longitude but nearer the equator. Like Poland or Croatia.