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

Hi, this is an excellent blueprint and saving me a lot of work!

In the ‘Dynamic Lighting - Ambient Light Sensor’ section, it only allows for individual lux sensors, is it possible to add a helper as a trigger please?

I have created an arithmetic mean helper from the 2 lux sensors I have in the room which I think would give a better indication of the levels.

Thanks so much for this :slight_smile:

@Seger85

It all realy depends on your sensors, your sensors reporting, your settings if they are to tight etc, sun elevation data, light transition, your heartbeat etc. There are a lot of factors.

If it is just a light that comes ON and goes OFF in a short time frame and you would just like it to adjust to the starting data, then you can set your heartbeat to a long time. This way it will take the initial reading (depending on your data and how old it it) and set the lights.

You can also still use the settings in the light control. If you are using dynamic brightness then in the light control you can still use colour temp and transition. If you are using dynamic colour temp then in the light control you can still use brightness and transition.

Because we can always use transition in the light control to help dynamic lighting this will also help you make it smooth.

There are so many factors because of all the sensors that are out there and all the settings you have to play with. It can be a bit tricky to get it right to what you would like and it may just not work how you would like it but I am hoping it will.

Blacky :smiley:

The light will turn OFF after your “By-pass - Time Delay”. When you turn ON the bypass the previous “Time Delay” is cancelled.

There is one thing to look out for and that is if you are only using scenes or scripts with no entity… you must have an entity in “Lights - Switches - Scenes - Scripts” and or “Night Lights” if that is the case too.

Blacky :smiley:

@ob1w4nken0b1

Just update the blueprint with the blue import blueprint again or use the GitHub url of this blueprint when using “Import Blueprint” in HA. HA will automaticity install the url for you. URL below for your convenience. Go to settings / automations & scenes / blueprint tab at top / import blueprint / then copy paste the url below in / preview and you should have an override blueprint button if all is correct. if so click it and you will have the url so you can use the new update feature into the future.

Blacky :smiley:

@nicnicol

I think you are saying you would like to use your arithmetic mean helper as the lux sensor. As long as it report in numeric state you can use it. Just enter in a lux sensor any one will do, then click on the 3 dots top right select edit in yaml, look for the lux sensor you just added in and replace it with your arithmetic mean helper entity ID. Click save and your done.

Hope this works for you.

Blacky :smiley:

New update 5.4

Maintenance :toolbox:

  1. Dynamic Lighting - Updated the numbering system to dynamic lighting.

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:

Hey @Blacky , thanks for pointing that out, I’ve been playing the 1000 possibilities up and down for a month now, but it’s the switched on light that changes my lux value positively by a whole 13lux. My first technique was to set the heartbeat high, but then I just get a change far too late in changeable cloudy weather that it puts the whole technique offside. As my sensor is very fast, I decided to go to 0.25-0.5 heartbeat.

My dimming value of the lamp is at 0% - 40%
My maximum value is 42lux/40% and ends at 71lux/0%

This results in 71lux - 42lux = 29lux/40pp, as the light is also for 13lux as mentioned above, it starts immediately and then jumps through its own light like a madman, which is logical. Sure, I can now increase the range between 42lux - 71lux, but then I have to increase the % value again and the cat bites its tail (it’s a German saying when you’re going round in circles :slight_smile: ).

If you could set the offet value of your lamp, it would somehow all make more sense. Now let’s imagine that everything remains the same, the weather, the position of the sun, the external reflections, i.e. the lux value is 50 and the light switches on with the value it would take at a value of 50. The next moment, however, the light value is at 63lux and this is only due to the light being switched on, in which case it would immediately adjust again. The offset value must be included in the calculation, otherwise it would keep adjusting itself and the biggest adjustment comes from switching the light on.

sorry a lot of text, very unsorted and then also in bad english.

thank you for always caring, it’s crazy how you always get it all through your head.

best regards
seger

1 Like

@Seger85

Thanks for your detail explanation :+1:.

Because we can use the transition in the light control options try using this. The slider will only allow you to set 5 / 30 seconds but just type the number in and click save. You say your sensor is fast and that is great :+1:. Not sure how fast it is but if it is instant then try using 180 seconds = 3 min in both then play around with it and see what happens. You can also play around with the heartbeat and see what happens now the transition is slow. The heartbeat has to be faster than the transition or transition will do nothing. Set heartbeat to 0.25 and then adjust from there.

Blacky :smiley:

1 Like

I have made some graphs for the new sun elevation feature used in Dynamic Lighting. Hopefully this will give you a better understanding of the settings. You can bring the start and end to be closer together or your can expand them out. You can also adjust the colour temps and brightness %. It is all up to you and what you would like to do. I think graphs just tell a thousand words. Hope this helps you to better understand sun elevation in Dynamic Lighting.

The setting in these graphs were.

Max Brightness Value = 100%
Min Brightness Value = 30%
Max Colour Temperature = 6500 k
Min Colour Temperature = 2000 k
Sun Elevation Rising - Start Point = 1.5 deg
Sun Elevation Rising - End Point = 35 deg
Sun Elevation Descending - Start Point = 35 deg
Sun Elevation Descending - End Point = 4.0 deg

The lowest you can go in elevation is -10.0 deg below this it will return your minimum settings.

This is how it looks in a sensor card

Edit: More information on Dynamic Lighting can be found here.

Hope this helps

Enjoy

Blacky :smiley:

2 Likes

Hey @Blacky thank you as always!

I think one of my next problems is that all my newly installed lamps (ceiling lamps / 10 pieces) do not support transition :frowning:

At least here in the overview: AwoX 33955 control via MQTT | Zigbee2MQTT.

Not listed and when I had set it at the time, the lamps no longer switched off. So the switch-off command was executed and the lamp was still on at about 2%. But try it again.

I also set the min. lux value to = 20lux to reduce the range of the brightness value to be changed in relation to the individual lux counters. It’s probably really the missing transition that makes it seem strange to me.

Thank you very much, I won’t give up yet.

Best regards
Seger

Hi @Blacky, thanks for building an awesome blueprint!

I’d like to request 2 enhancements if possible, please:

  1. The ability to disable the global Time Delay, so that a light will stay on indefinitely if triggered.
  2. Allow the time conditions to use the built-in Sun entities (e.g. Sunrise & Sunset), so that we can allow automations based on Sunrise/Sunset schedule. Example Template.

The scenario I’m trying to build is for the lights in my main kitchen and dining area.

I’d like the Motion Sensor to trigger the kitchen lighting scene between 30mins before Sunset and midnight.
This time is the main meal preparation and eating time, so the lights should remain on, even if there’s no movement detected.

Then, later in the evening the Nightlight schedule opens and the lights are allowed to switch on and off based on movement.

Then, the whole automation is off (conditioned) after midnight.

I know I can configure this with multiple automations, but it would be nice to have it contained into a single control.

Thanks in advance.

I understand that you can not use a physical connected switch as a by-pass.

However isn’t it possible to use a timed on/off/on/off sequence of such a switch to configure a state of a virtual on/off switch. the last one could be used as a condition for the by-pass.

In that case: to pauze the automation: turn light two times (within 10 sec) on and off. And to restart automation. do the same.

Or am I missing something?

Kind regards,
Victor

Hello @Blacky :sunny:

Thank you for this fabulous blueprint! :blush:

I have two issues :

  • Light color : I can’t manage to change the color temperature with every kelvin sliders.
  • Bypass : I can’t manage to bypass with button or boolan switch entities

Did you have any tips to help me? What I’ve done wrong? I tried many configurations…

Here is a snapshot of a yaml config that I’ve tried : https://pastes.io/itrr5axsc7

Thanks a lot!
Bertrand

@Seger85

You have got me thinking again :thinking: I have recapped your posts and it is on my mind :thinking:

Blacky :smiley:

@TimU

Would a template sensor be off the cards? If not let me know if you need help.

Blacky :smiley:

@VictorMarinus

Welcome to the community.

You can use a physical switch as long as it is not your light switch.

I have thought about it but best to have separate switch for this as it will upset the automation… so then if you have a separate switch just use the by-pass… I have gone down a few rabbit holes and one day I will find that rabbit and it wont even be in the hole… it will be directly in fount of me.

Blacky :smiley:

Blacky :smiley:

1 Like

@BertrandV

Welcome to the community.

I have looked at your yaml… thanks. With your set up the automation will not run because you are using devices in “Lights - Switches - Scenes - Scripts” you need to expand down to entities. Click Here on the how to.

Looks like you would like to also use night lights. You will need to input your lights as entities in also in “Night Lights”.

TIP: You can paste your yaml in the forum. use the </> button then paste it in there as it will keep its format.

Blacky :smiley:

1 Like

Thank you @Blacky !

But I have another issue. In fact, I was using an old automation inside Hue app. I have deleted it, and the room.
Now, I realize that the blueprint has never been executed. It is marked: last trigger / never. I don’t have any log.

Any clue to solve that? :pray:

alias: Lumière entrée dynamique
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.capteur_entree_mouvement
    light_switch:
      entity_id:
        - light.hue_ambiance_lamp_2
        - light.hue_ambiance_lamp_1
    time_delay: 2
    include_light_control:
      - use_transition
      - use_colour_temperature
    include_dynamic_lighting: enable_sun_elevation_colour_brightness
    dynamic_lighting_lux_sensor: sensor.capteur_entree_eclairement
    night_time_delay: 3
    include_night_light_control:
      - use_brightness
      - use_colour_temperature
      - use_transition
      - if_lights_are_on_adjust_when_crossing_over
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id:
        - light.hue_ambiance_lamp_2
        - light.hue_ambiance_lamp_1
    night_light_transition_off: 5
    light_transition_off: 3
    night_lights_after_time: "23:00:00"
    night_lights_conditions:
      - time_enabled
    night_lights_before_time: "07:00:00"
    dynamic_lighting_max_colour_temp: 2500
    dynamic_lighting_min_colour_temp: 2000
    dynamic_lighting_min_brightness: 100
    dynamic_lighting_max_brightness: 34
    night_light_colour_temperature: 1
    light_colour_temperature: 3000
    motion_bypass_lights_on:
      - input_boolean.forcer_lumiere_entree
      - input_button.force_lumiere_entree
    bypass_time_delay: 1.5
    motion_bypass_lights_off: []
    include_bypass:
      - bypass_enabled_turn_on
    include_bypass_auto_off:
      - bypass_auto_off_enabled_on
    light_brightness: 12

@blacky I can run the Sensor Light automation manualy but I can’t trigger it with my Hue Motion Sensor. This sensor is already used in another automation with success. I don’t understand why I can’t trigger your blueprint with it.

Yaml. automation reloaded after saving.
really the right motion sensor above

perhaps it has to be the other way round?
edit: just on the way, the other way round may also be wrong.
look at the sensor, hue always has 2 sensors, one does not change.