💡 Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

Hi Blacky,

In some of your explanation I think you say the light(s) will Decrease as the sun drops below the horizon. Again, I might be reading this all about face - I was thinking “why would anyone want to turn off lights as the Sun is going down”. I would have thought that one would want the lights to come on as the Sun sets.

I gave your YAML a go yesterday evening but I think I messed with the Sun elevation too much and screwed it. I’ll see what happens this evening.

Your support for this Blueprint is magnificent - I really hope I/we can get this going to suit my needs, odd as they are.

Light’s getting slowly brighter as the Sun goes down (1/2 hr perhaps) - then at a fixed time the lights Dim down slowly, 10mins perhaps, to a low light level and stay ON but dim - Then at a set time all go OFF.

Regards,

Bob


Very interesting: ESRL Global Monitoring Laboratory - Global Radiation and Aerosols

Hey Blacky! I found issue/bug with your blueprint and latest HAOS but not sure what exactly cause this, could you help please?
Using your blueprint with mix of zigbee/wifi lights (aqara) and motion/light PIR sensor, they are added as entity; dynamic light enabled as first option (lux controlled brightness). Before 2024.4 everything was fine: light could be switched on when motion detect and stay at brightness value based on dynamic light (50% for example), changing only when lux value changes too.
After 2024.4 HAOS update my light turning on with brightness based on dynamic light but right after it always goes up to 100% brightness according to step and heartbeat values. Looks like it ignoring my lux sensor after light turning on initially.
Nothing was changed from my side from february, only updates comes from HAOS. Restarting HAOS doesn’t help with this, 6.3

@chris400

This seams strange as in normal function the OFF is the last thing once motion is cleared and the time delay has passed. Is there something else controlling it?

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

@rick.ball

Maybe a easy way to see how the bypass works is to create a toggle helper and use it in the bypass. You then can try it out in different bypass options. It a lot to get your head around as the blueprint has so many options.

Blacky :smiley:

@Bobie

Yep as I thought option 4 works the opposite to what you are after. Good news is I have developed a new option yesterday and the sensor works, the blueprint has been updated and I just need to do the final live testing before I release it.

This option mimics the sun so what happens as the sun rises you have a low brightness level and warm temp then a midday you have a high brightness and a cool temp and as the sun sets you go back to a low brightness and a warm temp. You can wake up to a sun rise effect. If you have dark rooms like basements it can be used to mimic the sun. Also google ‘circadian rhythms’, light can be one factor and although this is very basic some people like it.

Yep, keep an eye out for the next release 6.5 and then you will use option 5 once you update.

Blacky :smiley:

@Sk1vvy

I am just about to test Dynamic lighting again (tomorrow) and will look into it to see if this is the case. Once I test it I will get back to you. I am currently on 2024.4.3.

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:

That is such a profound realization, that you might consider adding a toggle-helper widget, by default, to your blueprint. It can always be deleted, right? Maybe it could be a virtual-only dial-entity, called a blacky.

The blacky would be a home screen widget with a rotary-dial ist of labelled states, for an entiry or device that only exists virtually. Picos would pair to the blacky, and would be the only thing that could change the blacky’s state. Much better than using a physical $120 Lutron plug-in dimmer which is othewise not physically in use.

Not sure how relevant these posts are, but this implies Lutron pig- used to show up in HA without this.

EDIT: Lutron Pico remote switches are zigbee. So, If you unpair them from the non-pro version of the Lutron Bridge/Hub (because it uses HA-incompatible-SSH, not HA-friendly-Telnet), then you can connect these picos to HA via LEAP. This requires some kind of CASETA LEAP ADD-ON thingy, I am still researching that
 Stay tuned.

alias: Sensor Light Staircase FF
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.hue_motion_sensor_1_motion
    light_switch:
      entity_id: scene.scene_staircase_ff_day
    end_scenes:
      - scene.scene_staircase_ff_off
    include_light_control:
      - use_brightness
      - use_transition
    light_transition_on: 5
    ambient_light_sensor: sensor.hue_motion_sensor_1_illuminance
    ambient_light_value: 50
    include_device_tracker: device_tracker_disabled
    zone: zone.home
    people:
      - person.chris_home
    include_night_lights: night_lights_enabled
    include_night_light_control:
      - use_transition
      - use_brightness
      - if_lights_are_on_adjust_when_crossing_over
    night_time_delay: 1
    night_light_brightness: 1
    night_light_transition_on: 5
    night_light_transition_off: 10
    night_lights_conditions:
      - sun_enabled
      - time_enabled
    night_lights_after_time: "21:30:00"
    night_lights_before_time: "07:00:00"
    time_delay: 2
    night_lights:
      entity_id: scene.scene_staircase_ff_night
    light_brightness: 80
    light_transition_off: 10
    ambient_light_options: ambient_light_option_enabled
    include_dynamic_lighting: []
    dynamic_lighting_lux_sensor: sensor.hue_motion_sensor_1_illuminance
    dynamic_lighting_max_lux: 400
    dynamic_lighting_min_lux: 40

sure, thank you!

alias: "[Kitchen] Motion light"
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.datchik_dvizheniia_aqara_p1_occupancy
    light_switch:
      entity_id:
        - light.liustra
        - light.lenta
        - light.big_lamps
    time_delay: 2
    after_time: "00:00:00"
    before_time: "00:00:00"
    include_time: time_disabled
    include_night_lights: night_lights_enabled
    night_time_delay: 1
    night_lights_conditions:
      - entity_state_enabled
    night_lights_after_time: "01:00:00"
    night_lights_before_time: "09:00:00"
    end_scenes: []
    include_light_control:
      - use_transition
      - use_brightness
    include_device_tracker: device_tracker_disabled
    include_night_light_control:
      - use_transition
      - if_lights_are_on_adjust_when_crossing_over
      - use_brightness
      - manage_scripts_crossing_over
    include_dynamic_lighting: enable_lux_controled_brightness
    dynamic_lighting_lux_sensor: sensor.datchik_dvizheniia_aqara_p1_illuminance_lux
    dynamic_lighting_max_lux: 50
    dynamic_lighting_min_lux: 10
    dynamic_lighting_heartbeat: 0.5
    include_ambient: ambient_disabled
    night_light_brightness: 40
    night_lights_entity_state:
      - input_boolean.sleep_mode
    night_lights:
      entity_id:
        - light.liustra
        - light.lenta
        - light.big_lamps
    motion_bypass_lights_stop:
      - input_boolean.blok_kukhnia
    include_bypass_auto_off:
      - bypass_auto_off_enabled_stop
    bypass_auto_off_delay: 120
    include_bypass:
      - bypass_enabled_stop

Just came here to say that you’re an absolute legend, @Blacky. Love all the blueprints you put out and your dedication to help everyone with troubleshooting.

@chris400

Thanks for your YAML.

Could you try a few things for me.

  1. In dynamic lighting could you please select ‘Disable Dynamic Lighting’. You have used the ‘X’ to remove it but it is best if you select to disable it.
  2. Not sure what version you are on but because you are using scenes it is best to create 2 separate toggle helpers and add them to the inputs. This will really help the automaton function correctly. If you done see these options then please update.
    • Scenes & Scripts - Toggle Helper
    • Night Lights - Scenes & Scripts - Toggle Helper

The only time you will see it turn OFF and back ON again is when crossing over from normal lights to night lights if the scene is ON.

Hope this helps you.

Blacky :smiley:

1 Like

@Sk1vvy

Tested it here again and it is working and I can fault it. Just checking, where you live is is starting to get darker earlier (at night when you trigger the automation normally) thus the dynamic light calculation on initial start up could be higher.

Blacky :smiley:

@TheScubadiver

Thanks Ramon for you kind words. It is really nice to get these ones. Glad you like it :smiling_face_with_three_hearts:

Blacky :smiley:

1 Like

@Bobie

I am just about to releas a new update that will solve what you are trying to do. Please update to version 6.5 when I release it and in dynamic lighting you will select option ‘5 - Sun Elevation Lighting - Brightness - Inverted’. Below is the YAML for you again.

alias: Blacky Outside light tester
description: Blacky Outside Lights on and off test
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - schedule.a_test_light_schedule
    light_switch:
      entity_id: light.my_test_moer_zigbee_dimmer_light_2
    time_delay: 0
    include_light_control:
      - use_transition
    light_transition_on: 5
    include_dynamic_lighting: enable_sun_elevation_brightness_inv
    dynamic_lighting_min_brightness: 10
    dynamic_lighting_sun_elevation_start_falling: 5
    dynamic_lighting_sun_elevation_end_falling: -3
    include_sun: sun_enabled
    sun_elevation: 5
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id: light.my_test_moer_zigbee_dimmer_light_2
    night_time_delay: 0
    include_night_light_control:
      - if_lights_are_on_adjust_when_crossing_over
      - use_brightness
      - use_transition
    night_light_brightness: 10
    night_light_transition_on: 600
    night_light_transition_off: 5
    night_lights_conditions:
      - time_enabled
    night_lights_after_time: "18:30:00"
    night_lights_before_time: "19:10:00"

Let us know if the now works for you.

Blacky :smiley:

That’s not my case. I’ll try to explain as example:
dynamic_lighting_max_lux: 50
dynamic_lighting_min_lux: 10
my current setup. If LUX value 30 then light would turn on with 50% brightness. After this my LUX value still around 30 but light will up brightness until 100% with this heartbeat: dynamic_lighting_heartbeat: 0.5 with 7% steps i think. So my light would be 100% brightness in less than 5 minutes according to this settings, and LUX value is still the same. It happens only after 2024.4 update

New update 6.5

Your lighting experience, your way – take control and customize it to perfection! :bulb::sparkles:

New Feature :new:

Changes to Dynamic Lighting Options

  1. Added new option selection to Dynamic Lighting. This will allow you to use the sun elevation as the sun sets the brightness will increase and as the sun rises the brightness will decrease. This is a nice option to use for your outdoor garden lighting systems.

    • 5 - Sun Elevation Lighting - Brightness - Inverted
  2. Changed Dynamic Lighting numbering system to the existing 5 & 6 options. Option 5 is now 6 and option 6 is now 7. This will not effect your inputs it is just a note to be aware of.

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

@Sk1vvy

Okay, I see what you are saying. I will test this now.

Blacky :smiley:

@Sk1vvy

Okay this is my settings for the test. Home assistant 2024.4.3. Blueprint Version: 6.5

  • Use The Dynamic Lighting Options = Option 1
  • Dynamic Lighting - Max Lux Value = 50
  • Dynamic Lighting - Min Lux Value = 10
  • Dynamic Lighting - Max Brightness Value = 100%
  • Dynamic Lighting - Min Brightness Value = 0%
  • Dynamic Lighting - Heartbeat = 0.5
  • Dynamic Lighting - Step Value = 4%
  • Dynamic Lighting - Dead Zone (±) = 7%

This is the outcome of the test.

  • Actual Lux sensor reading = 30.7 lux This stays consistent through the test.
  • Actual Light Brightness = 48% This never changes

I then took the lux value to 16.3 lux and my brightness = 80% This never changes.
I then took the lux value to 0.0 lux and my brightness = 96% This never changes. The dead zone is 7% so It stayed at 96%.

Okay so we know it is working here. Now we just need to work out what is going on at your end.

Nothing changed here and you are on the same BB version so we can rule that out. I tested it here on the latest BB version but updating it didn’t change the BB in that area and I am on the latest Home assistant 2024.4.3. So I would start looking at the lux sensor as it uses that to calculate the brightness %. It just could be a gremlin in the system and that is very had to find and fix. Maybe the next HA update will resolve it or you could try to use a back up and roll back then try update again. I hate doing that so I would wait for the HA update and see what happens.

Let us know how you go and I hope you find it.

Blacky :smiley:

What can I say - thanks for all your effort put into this.

Now I understand why someone would want to mimic the sun rising like in a dark bed room and so on


One more thing you might find the time to sort out is the last part to dim down slowly at a fixed time also doesn’t dim down - it jumps to the set brightness level and stays until the set off setting - at that time the light comes on full - does not go out.

I thought that if we/you can get the Dynamic part working to brighten the lights at Sunset then I could perhaps use the same Dynamic option to dim the lights down and then finally off at a set time or whenever.

Before I found this Blueprint I was toying with the idea of trying to write my own YAML file but I couldn’t find a ‘While’ statement to do the dimming


Again thanks for all this help and work you are putting into this Blueprint.

Regards,

Bob


1 Like