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

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

quick question, must be me missing something because I’ve tested everything but it doesn’t seem to work.
is there a way to delay the off state on the light when the binary sensor goes back to off (for example the door sensor switches from open to close), I would like to have a little delay before the light goes off.
I tried several things but the only thing I was able to +/- use this was adding the transition timer but not all my outdoor lights support transition states so…

First, i love this blueprint and your others. I setup a basic smart light automation with a time trigger and some lights. no light control, bypass, night light etc. I did enable weekdays (M-F), but the automation is still being triggered on Sat and Sun.

I have tried disabling weekday, selecting various days between Mon and Fri, Mon only and it still fires on Sat/Sun. I have also deleted the automation and recreated it. My last test was in v2.6.

Any suggestions?

@tretabyte

Have a look at this blueprint. :bulb: Sensor Light it has a delay you are after.

Blacky :smiley:

@franknitty69

This is for the OFF only right?

I have this on my list to fix and I forgot / missed it… I will fix it now.

Blacky :smiley:

New update 2.8

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

:bug: Bug Fixes

  • Weekdays
    • Fixed a bug when disabling a weekday would still turn it OFF if the light was ON.

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:

Thanks for the quick update. I will give it a try and report back.

Update - it is working now. I created a simple automation with only mon-fri enabled. I triggered it on sat and sun and the lights did not come on. let’s go!!!

1 Like

Hello

Not sure what I’m doing wrong here.
trying to add automation “when person is detected by G4 Doorbell to turn ON, over head light, and Off when no detection”. I’ve Tried running the action but nothing happens.

alias: Front Door Overhead Light-Person Detected
description: “”
use_blueprint:
path: Blackshome/smart-light.yaml
input:
include_entity_state:
- entity_on
- entity_off
entity_input: binary_sensor.g4_doorbell_pro_person_detected
include_sun:
- sun_falling
light_switch:
entity_id: light.front_door_overhead_light
include_light_control:
- use_brightness

type or paste code here

@dmob69

Thanks for you YAML.

Looks like you would like to turn ON a light when your doorbell detects motion but only when the sun is below a set value.

If this is the case then I would recommend using my :bulb: Sensor Light blueprint. In this blueprint you would add your binary_sensor.g4_doorbell_pro_person_detected as the trigger and enable the Sun Elevation.

What ever blueprint you decide you must include your lights to turn ON in the Lights section. Current you have no lights selected so there is nothing to turn ON.

Blacky :smiley:

hello

thanks for quick replay

in the blueprint i did select the light to turn ON

the automation i would like the IF person detected, turn Light on during Sun Elevation. Then turn off light when person detection stops

@dmob69

Yes, you’re correct… that was my oversight when cleaning up your code in the automation.

Now you’re working on the sensor light blueprint, not the smart light blueprint.

What you have currently will turn the light ON and OFF when motion is detected, regardless of the time of day.

If you want the light to turn ON only when it’s dark (e.g., when the sun is below a certain elevation), check the sun section in the blueprint and enable it. You’ll also find a helpful link there explaining how to configure sun elevation settings.

Blacky :smiley:

Hi

I’m a little confused about the settings. I’m trying to figure it out and the lights in the kitchen still turn on only when the presence sensor detects movement. I would like to add a lux sensor to turn off the light during the day and block the presence sensor if lux is more then 200. Please take a look at my settings, I don’t know what I’m doing wrong.

alias: Kuchnia obecność nowe
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_entity_state:
      - entity_on
      - entity_off
    entity_input: binary_sensor.czujnik_ruchu_siec_kuchnia_presence
    include_sun: []
    sun_elevation: -0.5
    include_ambient:
      - ambient_high
      - ambient_low
    ambient_light_sensor: sensor.luxy_kuchnia_illuminance_lux
    light_switch:
      entity_id: light.kuchnia_sufit
    include_light_control: []
    dynamic_lighting_lux_sensor: sensor.luxy_kuchnia_illuminance_lux
    include_night_lights: night_lights_disabled
    night_lights_conditions:
      - entity_state_enabled
    night_lights_entity_state:
      - light.kuchnia_nocne
    night_lights_after_time: "23:00:00"
    night_lights_before_time: "05:00:00"
    night_lights:
      entity_id: light.kuchnia_sufit
    ambient_light_value: 80
    ambient_light_value_off: 200
    include_dynamic_lighting: enable_lux_controled_brightness
    dynamic_lighting_max_lux: 500```

@NoobABC

I think this blueprint would suit what your trying to do better :bulb: Sensor Light

Have a look at it and I sure you be able to achieve what your trying to do.

Blacky :smiley:

@Blacky

The same story my sensor notification in the kitchen at this moment 90 lx I set ambient light sensor on minimum 40 lux and max 400 lux lights whont on. They only turn on when the light sensor is completely covered. Main motion sensor/Trigger is presence sensor

alias: Kuchnia czujnik obecności
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.czujnik_ruchu_siec_kuchnia_presence
    light_switch:
      entity_id: light.kuchnia_sufit
    time_delay: 0.5
    include_light_control:
      - use_brightness
      - use_transition
    include_light_colour_control: use_colour_temperature
    include_dynamic_lighting: enable_lux_controled_brightness
    dynamic_lighting_lux_sensor: sensor.luxy_kuchnia_illuminance_lux
    dynamic_lighting_time_start_evening: "16:00:00"
    dynamic_lighting_time_end_evening: "21:00:00"
    dynamic_lighting_state_control: enable_state_control
    dynamic_lighting_state_control_activation_state: "off"
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.luxy_kuchnia_illuminance_lux```

Found solutiona long time ago I installed the adaptive light add-on I forget about this which automatically added my kitchen lights entity. I removed entity form Adaptive Lights and all works great.