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

@xXAzazelXx

You have 2 options.

  1. If your not using night lights then use that and just create a dummy switch and turn that ON / OFF.
  2. You can use the by-pass. More info is in the FAQ for this. There are many options with this that will work.

Blacky :smiley:

Hi @Blacky, yes i would appreciate it if you can look at it. i’m still testing it but i get the same results.
thks

@Blacky I have an entertainment room that has a presense sensor, an Apple TV and Hue lights. I have a custom automation that turns on the lights based on presence to about 75%. But when I turn the Apple TV on they dim to about 10%, and go back to 75% when the ATV turns off. Is there a simple way to do this with your blueprint?

Hey @Blacky ,

Sorry so if i want the automation to run only during the times when sun is down, and if the entity group “Phone Charging” is state false, this this how you would set it up?

Basically only run during the sunset, don’t run automation if the “Phone Charging Sensors” is true?



@JaccoN

Okay, can you describe again what you are trying to do and we will go from there.

Blacky :smiley:

@DuckDuck25

Yes, you use this blueprint for your 75%. Then you use this blueprint :infinity: Sensor Light Add On - Media & Movie Lights - House Alarm Lights - Smoke Alarm Lights & Exhaust Fans + More to do the 10%. It also has intermission + more. This was all tested with Apple TV.

Blacky :smiley:

@xXAzazelXx

You can do it like that. Be mindful with the “Phone Charging”… the state may change when it is charged and turn OFF. We use “focus” but in night lights as we would like some light to come ON if we get up. Focus is the apple of do not disturb.

Tip: With your by-pass option 3 it will just keep the current state of your light so if they are ON you will have to turn it OFF. If you use option 2 it will turn your light OFF for you. You can set the “By-pass - Time Delay” so when you plug it in it will go OFF in the set time period.

Blacky :smiley:

Okay @Blacky, here is the required situation:

my front light goes on an 20% when its dark, this is controlled by another scene.
If somebody comes to my door, a motion sensor triggers and the front light and an extra ceiling light go on at 100% until the motion is gone. After that time T (5 min), the ceiling light goes off and the front light goes back to 20%.

This can be done with your blueprint, i call an extra scene as a turn-off scene. In this scene i set the front light at 20%. This idea was already suggested by you.

But: it doens’nt work as expected. If the front light is already on, BOTH lights wil turn off after time T.
But i noticed that if the front light is off before the blueprint is called it works as expected: the ceiling lamp goes of after time T and the front light goes to 20%.

Is this expected behaviour or not? i would assume not? the inital state should not matter i would expect.
thks
Jacco

Thank you!!! You are amazing!

@JaccoN

Thanks for the info :+1:

Automation 1

  1. Front light @ 20% when dark turned ON and OFF by another automation. All good.

Automation 2

Can you try this… I haven’t tested but :crossed_fingers: hopefully it will work.

  1. Front light in a scene and set at 100%. Enter the scene into “Lights - Switches - Scenes”.
  2. Extra ceiling light entered in as an entity and the light controls to 100%. Enter the entity into “Lights - Switches - Scenes”
  3. Scene to turn OFF set front light to 20%.
  4. Same ON and OFF conditions as set for automation 1. Example you could have the sun, ambient and or time condition. So automation 2 will not run out of automation 1 conditions… maybe 1 minute after automation 1 turns the light ON to 20% and maybe 1 min before automation 1 turns the light OFF. The OFF will probably be the main condition and the ON could be the same :thinking:

:crossed_fingers: Let us know if this works for you.

Blacky :smiley:

:smiling_face_with_three_hearts: Glad you like it…

Blacky :smiley:

Hi @Blacky, i already set this up. i made an alternative test with just 2 lights in my kitchen. As turn-off scene I set 1 off the lights to 20%.
I get exactly the same behaviour.
for the record, i don’t have automation 1 here, its just plain simple: 2 lamps that get triggered by a motion and after time T they turn of and 1 of them should stay on which is achieved by the turn-off scene.
Here is the code with your blueprint:

alias: Test blueprint with turnoffscene
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.aqara_motion_sensor_beweging
    light_switch:
      entity_id:
        - light.keuken_keuken_kast_414
        - light.keuken_keukeneiland_416
    time_delay: 0.2
    include_light_control:
      - use_brightness
    light_brightness: 50
    include_bypass: []
    motion_bypass_lights_on: []
    motion_bypass_lights_off: []
    include_night_lights: night_lights_disabled
    include_night_light_control: []
    night_lights_conditions: []
    night_lights_entity_state:
      - input_boolean.sleepmode
    light_transition_on: 5
    end_scenes:
      - scene.testscript_dim

but in mine setup i cannot make this work it the light is already on...

@JaccoN

Hi @JaccoN, what you are doing is you are entering both of your lights in as entities into “Lights - Switches - Scenes”. I have just tested it here and it works if you follow the steps.

Please read the instructions clearly. It is the same as above but we will keep it simple by using “Light 1” and “Light 2”. Obviously you can change the brightness to your liking.

  1. Create a scene for “Light 1” that is 100%. Enter the scene into “Lights - Switches - Scenes”.
  2. Enter “Light 2” in as an entity and enter the light entity into “Lights - Switches - Scenes”.
  3. Create a scene for “Light 1” that is 20%. Enter the scene into “Scenes To Turn OFF”.

Let me know if it works for you.

Blacky :smiley:

@Blacky, I see what you mean. I have to put the light that has two different brightnesslevels in a turn on scene and in a turn of scene.
I will give it a try and let you know.

Update: it works!
Only the downside is that the options in the blueprint are not applicable anymore on the lights which are called from the scene.

But i still don’t understand why i cannot call the lights directly from the blueprint even if i call a scene to modify the brightness in the Scenes-turn-off option. Its not what you expect. I mean: i call the blueprint, set the lights, the blueprint ends, and then i call an extra scene to do something with one of the lights which i call from the blueprint.
Don’t get me wrong, its not critique, its curiosity :slight_smile:
thks

hi, any idea why I would get Unknown error when trying to install this blueprint?
I have very few plugins, am on the latest version in the stable branch
image

@JaccoN

Nice one :+1: Glad you got it up and running.

You still can do it all in a scene. The main thing is you have Light 2 entity entered in and not in the scene with Light 1.

There are a lot of options and reasons why it is set up like this.

Anyway glad you got it up and running.

Blacky :smiley:

@dakipro

Not sure why it is doing this but I can see the blueprint address is not there. Could be your firewalls or your browser. If possible maybe try a different browser or try to import it on your phone.

Blacky :smiley:

Hi @Blacky

Thanks for the tremendous Blueprint!!

I have implemented a couple of instances of it in rooms where I don’t have motion sensors, rather I use a binary sensor Helper of type Times of the Day so that the automation activates at a certain time of day.

I have set my ‘Evening’ helper sensor as the main ‘Trigger Sensor - Binary Sensors - Schedule*’ and my Night helper senor as the Night Lights ‘Night Lights - Entity State’.

‘Use The Time Options’ is enabled and set to 5pm (the time the Evening helper sensor turns On) to 1am.
‘Night Lights - Start Time’ is set to 8:45pm - the same time that the Night helper senor turns On.
‘Night Lights - End Time’ is set to 1am.

My issue with this setup is that the lights don’t dim to the Night Lights brightness setting at 8:45pm. They stay at the non-Night Lights setting.

Here is my automation setup YAML:

alias: Front of House Lights
description: Automation of Front of House Lights
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.evening
    light_switch:
      entity_id:
        - light.front_of_home_driveway_266
        - light.front_of_home_front_porch_ceiling_387
        - light.front_of_home_front_house_sofitts_296
        - light.front_of_home_front_soffits_666
    time_delay: 225
    include_light_control:
      - use_brightness
      - use_transition
    light_brightness: 50
    light_transition_on: 3
    light_transition_off: 5
    include_sun: sun_enabled
    sun_elevation: 13.5
    include_time: time_enabled
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id:
        - light.front_of_home_front_soffits_666
        - light.front_of_home_front_porch_ceiling_387
        - light.front_of_home_front_house_sofitts_296
        - light.front_of_home_driveway_266
    night_time_delay: 195
    include_night_light_control:
      - use_brightness
      - use_transition
    night_light_transition_on: 3
    night_light_transition_off: 5
    night_lights_conditions:
      - time_enabled
      - entity_state_enabled
    night_lights_after_time: "20:45:00"
    night_lights_before_time: "01:00:00"
    after_time: "17:00:00"
    before_time: "01:00:00"
    include_bypass: []
    motion_bypass_lights_off:
      - input_boolean.lounge_sensor_light_bypass
    bypass_time_delay: 1
    bypass_auto_off_delay: 1
    include_bypass_auto_off: []
    night_lights_entity_state:
      - binary_sensor.night

Your welcome and thanks for your kind words :smiling_face_with_three_hearts:

Yes this is correct and was a feature added in to Version: 3.5. The link explains why this was introduce.

If you create 3 scenes,

  1. one for normal lights (set your brightness) and enter in “Lights - Switches - Scenes”
  2. one for night lights (set your brightness) and enter in “Night Lights”
  3. one with all your lights OFF and enter in “Scenes To Turn OFF”

I didn’t retest again… but if my memory serves me right, it should work :crossed_fingers: Transition should still work.

Let us know if this works for you.

Blacky :smiley:

Hello, If this was answered before then apologies I couldn’t find it. I’m using a presence detector to turn the lights on/off, based on Ambient light value. I also have an Ikea Styrbar that I would like to use to turn on or turn off the lights, when I don’t want the lights on or off when I’m in the room. What is the best way of setting this up, do I create another automation to turn on or off the lights, and then use the By-pass switch? Or what am i missing?

Thank you