šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

I am confused on how to use this Blueprint.
I need to include three sensors but the blueprint has only one line to enter the sensor.

I have a large room with three motion and presence sensors to cover the entire area. I need any one of them to turn the lights for the whole room on and lights stay on until none of the sensors detect presence.
Can you advise me?
Thanks!

Hi there, great blueprint!

I am wanting to add another condition (without requiring use of additional user-operated bypass switches).The requirement is quite simply to have the automation NOT trigger if the light is already on.

Initially I thought I could set up an ON script which toggles the light but I cannot select an OFF script (it is device or scene only, even though it is labelled as ā€œScenes - Scripts To Turn OFFā€).

I could leave this blank and perhaps write another automation that turns the light off automatically after ā€˜xā€™ minutes when a helper switch is triggered but that seems like perhaps I am overcomplicating the issue perhaps?

Alternatively, could I edit the YAML to include another simple condition?

"condition: 
  not: 
    condition: 
      entity_id: example_light: 
      state:on"

Thanks in advance!

Here is the FAQ on how to do it: šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights - #34 by Blacky

1 Like

Make sure youā€™re using v5.8 - it supports scripts in ā€œScenes - Scripts To Turn OFFā€

1 Like

Awesome, thanks. Iā€™ve updated to 5.8.
OFF scene now selectable which means I donā€™t need to implement any helper toggles.

ON script simply checks if light is already ON and stops if so (otherwise turns light on).
OFF script turns light off.

I now have a motion activated light that wonā€™t turn itself off if it has already been commanded on by the switch :+1:
I realize the caveat of this is that I likely miss out on some of the dynamic lighting options/transitions since I am pointing the automation at a scene rather than device/entity.

Surely this check would be worth building into the template as an option?

Currently I use a simple automation, see below.

trigger:
  - platform: state
    entity_id:
      - binary_sensor.bewegung_sonoff_5z_bewegung
    to: "off"
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition:
  - condition: state
    entity_id: light.skyconnect_z_licht_bad_og
    state: "on"
action:
  - service: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.skyconnect_z_licht_bad_og

But I want to be ready for the future when I might use some of the options this blueprint provides.

I really love the Dynamic Lighting feature, but was wondering if thereā€™s a way to bypass it after sunset? I know we can set it to run between set times, but i live in a place where, depending on the season, it gets dark (or stays light) at wildly different times.

As i mentioned a bit above, iā€™m trying to figure out a way to have only certain lights in my living room dim in the evening when there is no presence near them, but the Dynamic Lighting then triggers them on again.

Sorry for the late respons. My notifications were not on.
But here is the code.
So even when the Lux is above the value the Ledkoof comes on when there is movement.

alias: Ledkoof Fibaro Automation Script
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.fibaro_eye_sensor_state_any
    light_switch:
      entity_id: switch.ledkoof
    time_delay: 12
    ambient_light_sensor: sensor.fibaro_eye_illuminance
    include_sun: sun_disabled
    ambient_light_high_value: 8
    motion_bypass_lights_stop:
      - input_boolean.ledkoof_bypass_schakelaar
    include_bypass:
      - bypass_enabled_stop
    ambient_light_value: 6
    bypass_time_delay: 0.75
    motion_bypass_lights_off:
      - switch.ledkoof

@milkplus

Not sure as sensor 5 has to be off for 5 minā€¦ maybe that is the trigger and if the script runs this may already be done. The sensor 1 could be the sameā€¦ same but different to turn on lightsā€¦ you will just have to try and see then adjust if not right.

EDIT: I see you have more postsā€¦

yesā€¦ I thought that may be the case but was not sure. You will need to set your conditions up correctly to your liking.

Yep, use night lights and the sun condition. Dynamic Lighting feature is not used in night lights. Maybe try this way.

Blacky :smiley:

@dMopp

I has a quick look at HA YouTube on CarPlay. It looks like it has the app so you can control your garage door or anything in HA. So if you would like to turn the light ON you could just use the switch. Maybe you can give me a step guide so I can understand more of what you are trying to achieve.

Blacky :smiley:

@herbert1910

I use it all the time for testing so it should work as the trigger.

Blacky :smiley:

@Lyr3x

I answer may be wrong so sorry if that is the case. Just let me know if I got it wrong.

If the trigger is ON ( mmWave sensors) and your LUX drops from above to below this will trigger the automation and the light will come ON. If it goes from low to high it will trigger the lights OFF. The key is the mmWave sensors must be ON. If you have 2 triggers like a PIR and a mmWave sensors then you will need to group them together.

Blacky :smiley:

For this you are best to do a custom automation. The flow should look like this.

When motion goes from ON to OFF for 5min then turn light OFF.

So like this

Create new automation
When = state / select your motion sensor / from = detected / to = clear / for = 5 min
And if = state / select your light or switch (mirror lights) / state = ON
Then do = light turn off / select your lightā€¦ it could be switch turn off just depends what you have.

EDIT: Yep I should read all the post firstā€¦

Blacky :smiley:

@Snobound2

It is a lot to take in at first and I fully understand this can be the case.

As you enter in a sensor another input will pop up allowing you to add another one. BUT!!! I would strongly recommend you group your sensors and just add the group as it will work a lot better for you.

For more information on how to set up group sensors please Click Here.

100% use the group link provided above and it will walk your through the How To Do It.

Blacky :smiley:

@Mattymo

Dynamic lighting only works for a light entity not a scene or a script. Have a look at the FAQ on dynamic lighting, hopefully it will explain everything for you.

Some work is happening on scenes and scrips now but dynamic lighting will still need to be a light entity.

Blacky :smiley:

Thanks @clowgg ā€¦ next time I should read all the post from top to bottom before answering them :rofl: :rofl:

Love your work :+1:

Blacky :smiley:

@Justdigit

Hi Justin, thanks for your YAML.

Please enable the option :wink: see below.

Blacky :smiley:

1 Like

thanks for the input. Iā€™ll see what I can figure out

@milkplus

No problemā€¦ If you are still unsure just let us know. Happy to help.

Blacky :smiley:

Thatā€™s right. Youā€™re right. The input_button can be used as a trigger.

I would like a helper switch to be activated when a movement takes place.
It doesnā€™t work with an input_boolean - at least not for me.

Is there a way to switch a helper?