🔆 Smart Light - Entity - Sun Elevation - Ambient & Time Triggers

Hi @Blacky, Thank you for your reply and the advice about the unavailability of my LAN when I switch off my router. To be honnest I had missed that. But I have two releaters in my network and hopefully these can keep the local LAN active.

But I have yet to test this.
Thank’s for your reaction. Bert

1 Like

Hi,

This blueprint look great. Can you tell me if the countdown is restarted when the trigger goes ON before the end of the timer?

In other words, I don’t want the scene goes off when a motion is still detected.

Hi Blacky,
I saw that @psyko_chewbacca reported an issue that his lights turned on after a HA restart. In 2.3 you fixed some of these bugs, however, for me I still turns on all the connected lights of my automations after a restart/update.
Not 100% but I think it only applies to the Smart Light blueprint, not the Sensor Light.

Stifter

Hi All,

I have a couple different simple automations to turn lights on and off. A weekday schedule and a weekend schedule. Using the sun to turn them on an a time to turn them off with weekday enabled. I’m having trouble figuring out why my weekday automation is triggering on days that it’s not enabled for. It shows being triggered last night at 11pm.

alias: Light On/Off - Sun Schedule Weekday
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_sun:
      - sun_falling
    sun_elevation: 0.5
    include_time:
      - time_off
    before_time: "23:00:00"
    light_switch:
      entity_id:
        - light.lamp
        - light.tree
    include_weekdays: weekday_enabled
    weekday_options:
      - mon
      - tue
      - wed
      - thu
      - fri

Also, if I want the lights to shut off on the weekend at say 1am for Fri and Sat night do I use Sat and Sun as the days for enabling that or does that carry over from the day the light was switched on?

Thanks, friend. There must be something crazy hanging around in the background from my old manual scripts and automations. Will re-visit all config areas in forensic detail and remove anything which could compete with this incredible blueprint. Cheers, and Merry Christmas to you and yours :beers: :christmas_tree:

1 Like

@Hugoliv

Hi Olivier,

Welcome to the community.

In this blueprint it uses triggers to turn entities ON and OFF so there is no countdown. If you are referring to the new Cross Over - Time Delay feature in night lights then the time delay only starts once the motion sensor is cleared. If for some reason the motion sensor is triggered again within your time delay, the dime delay will be canceled and the process will start all over again.

Blacky :smiley:

@Stifter

I think I have seen that here once, I will need to look into it. Thanks for the heads up.

Blacky :smiley:

@sternweezy

I made it so it will always turn the light OFF (as a safe guard) but I think I should change that. I will have to fix this and release a new update.

Blacky :smiley:

1 Like

Hello Blacky and thanks for your amazing blueprints!

One thing I would like to see in this blueprint is support for Dynamic Lighting using time of day. A kind of artificial circadian lighting or sun elevation.

Reasoning behind this is that for us living in the far north using sun elevation makes very little sense during winter as we have only a few hours of daylight if at all. Vice versa during summer time the sun doesn’t set below the horizon at all. So it is better to mimic daylight and circadian rhythm indoors using adaptive / dynamic lighting simply using time of day instead of sun elevation.

Would it be possible to consider adding this kind of functionality as well? To summarize it could include simulated user electable sunrise and sunset times + “simulated dusk and dawn duration”.

Heikki M

@hsmanninen

Thanks for your kind words.

I have developed this already… but I have to find were I saved it :thinking:

So your looking for time control with brightness and colour temp in one option?

Blacky :smiley:

@Blacky Ideally I would like to have the existing Dynamic Lighting functionality but with “Sun Elevation” being replaced by artificial time based sun elevation, meaning e.g.:

Sun Elevation Rising - Start point: 6 am instead of real elevation
Sun Elevation Rising - End point: 9 am …
Sun Elevation Descending - Start point: 5 pm …
Sun Elevation Descending - End point: 7 pm …

Looks like I’m hitting same kind of bug with Smart Light blueprint also:

After adding Bypass entity functionality my Night Light trigger stopped working.

Heikki M

@hsmanninen

Thanks for your feedback, I have fixed a lot of the bugs to… keep an eye out for the update as I am in the QA stage of it.

Blacky :smiley:

New update 2.5

Smart Lighting: Your Lights, Your Way - Take Control and Customize it to Perfection! :bulb: :sparkles:

New Feature :new:

  • Dynamic Lighting - You now have 4 new time controlled options. If you live in the far north or south, using sun elevation may not be practical during winter or summer, as daylight hours can be very limited or constant. These new options can help simulate a normal day of artificial lighting, providing a more consistent experience for those without typical daylight patterns. As always, you have full control to customize the settings to your liking.

:bug: Bug Fixes

  • Fixed a bug in Dynamic Lighting cross over from night lights.
  • Fixed a bug in the bypass function where, when the bypass was turned ON, changes in site conditions from normal lights to night lights were not evaluated correctly when the bypass was turned OFF. This bug has now been resolved.
  • Fixed a bug in HA restart.
  • Fixed bugs in bypass.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

1 Like

Hey Blacky, could you add the ‘Device Tracker’ option to the blueprint?

@FRIMatze

Thanks for your suggestion, I will put it on the list of suggestions.

Blacky :smiley:

1 Like

New update 2.6

Smart Lighting: Your Lights, Your Way - Take Control and Customize it to Perfection! :bulb: :sparkles:

:bug: Bug Fixes

  • Dynamic Lighting - A bug affecting dynamic lighting options 10, 11, 12, and 13 has been fixed. Previously, re-triggering the automation caused a loop that consumed excessive RAM and issued a critical log. This issue was caused by a single condition leading to an unintended loop. :pensive:

    The updated blueprint resolves this problem. :raised_hands: Please update your blueprint promptly to apply the fix.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

New update 2.7

Smart Lighting: Your Lights, Your Way - Take Control and Customize it to Perfection! :bulb: :sparkles:

:new: New Feature

  • Dynamic Lighting - State Control Option
    You now have an option to enable or disable dynamic lighting based on the state of a specified entity. When the entity is in the selected activation state, dynamic lighting will function as configured. When the entity is not in the activation state, dynamic lighting will be disabled. This allows you to toggle between normal lighting and dynamic lighting based on the entity’s state.

  • Dynamic Lighting - Next Day
    With options 10, 11, 12, and 13, you can now set the time for transitioning to a new day.

:bug: Bug Fixes

  • Dynamic Lighting
    • Resolved an issue with options 10, 11, 12, and 13 that could cause excessive RAM usage and generate a critical log, depending on your settings.
    • Fixed a bug where turning OFF the bypass might not reset your lights correctly.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

3 Likes

Hello Blacky,
I’m a newbie in the Home Assistant universe and have only been working on it for a few days. The trigger for this was my desire for the many Hue lights I have to adapt their color to the time of day. This worked quite well with adaptive light from Apple Home Kit, but unfortunately the brightness is not reduced in the evening and at night. The smart light blueprint, especially in version 2.7 with Dynamic Lighting, promises a lot more.
I followed the explanation of the functions from January 2023 (🔆 Smart Light - Entity - Sun Elevation - Ambient & Time Triggers) as best as I understood it, but unfortunately without the desired success.
In my case, there is a stairwell situation. On dull and cloudy days, dimmed lights must also be switched on during the day. If the Hue motion sensor (SML001) detects movement, the light should get a little brighter and if the brightness is sufficient on sunny days (Hue motion sensor - over 20 lux) the light can be turned off.
The Sun Elevation trigger is certainly good in summer, but in winter the light is dimmed too early in the evening and too late in the morning.
Can all of these requirements be met? I would be delighted to receive an answer that helps me understand the many functions, especially dynamic lighting, and use them correctly.
I am from Germany and of course wrote the text using Google Translate and hope that everything has been translated clearly.

Smart Light seems to be a powerful tool, great work!

best regards, minimac

P.S. Will there be an update to the explanation of the functions from January 2023?

@minimac

Welcome to the community.

Yes, google is working well.

Because you would like this it is best to use the ambient option. This will turn your light on when it is dull. Then you use the night lights option and use your motion sensor as the night light state condition Enable entity state option. Then in Night Light Control make sure your select If lights are ON, adjust the lights when crossing over and use the Use cross over time delay from night lights to normal lights and set your time delay. What that will do is when motion is detected it will go into night light mode (don’t get hung up on the name of night lights as it is just another light option) and the lights will be what you set in night lights. The time delay is when you motion clears before it will go back to normal lights.

So what will happen is your light will come on to your normal light setting when the lux level is too low (day or night), then when motion is detected it will go to your night light setting and then revert back to normal light when the motion sensor is clear.

Try it out and if you are still having problems then could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on “</>” and paste code in there.

Blacky :smiley:

1 Like