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

I just love the blueprint, congrats to developer.

However I’d like to know if is it possible to prevent light turning off when I turn on the one manually?

Yeah, I see the By-pass, but I need to apply it to relay, so if I turn on the light on relay or app, the light will keep on, even with no more motion.

Blacky, still having trouble with multiple sensors (in group), one an aeotec motion sensor and the other a presence sensor, keeping a light on once it’s been triggered. Question. If I have 2 items in a group, both binary sensors, but they return different things (on-off vs detected-clear), will your Blueprint work as designed? I’m wondering if your blueprint is only responding to the on-off of the Aeotec motion sensor, and not the detected-clear of the presence sensor.

@Fred54

All good… your lights are coming on and off with motion.

Now you by-pass. What ever you use to turn the by-pass on and off the entity that turns ON / OFF must be seperate for each by-pass. Example,

Not sure how your Ikea Styrbar works but lets look at a few things.

Short Press

If a short press turns ON helper 1 and a short press again turns OFF helper 1 then that is good.
If a short press turns on a separate entity (entity 1) that you can use and a short press turns OFF entity (entity 1) then that is good to.

You then have a short press separate entity you can use in the by-pass.

Long Press

If a long press turns ON helper 2 and a long press again turns OFF helper 2 then that is good.
If a long press turns on a separate entity (entity 2) that you can use and a long press turns OFF entity (entity 2) then that is good too.

You then have a long press separate entity you can use in the by-pass.

By-pass

Option 1, 2 or 3 has to have a different entity for it to work. It can’t be the same entity used in each option.

  1. Option 1 = Short Press. When this happens and the entity 1 or helper 1 turns ON the light will turn ON.

  2. Option 2 = Long Press. When this happens and the entity 2 or helper 2 turns ON the light will turn OFF.

  • If both by-passes are ON they both have to turn OFF for motion to work again.
  • If both by-passes are ON and the light is OFF and you would like option 1 by-pass to turn the light ON then you must turn OFF option 1 and then turn it back ON again for the light to come ON.
  • If both by-passes are ON and the light is ON and you would like option 2 by-pass to turn the light OFF then you must turn OFF option 2 and then turn it back ON again for the light to turn OFF.

Now knowing this the best way to handle this is to decide what you would normally like to happen when the b-pass is turned ON. Would you like option 1 to turn the light ON, Option 2 to turn the light OFF or option 3 to keep the light in it current state being ON or OFF at the time you turn the by-pass ON. When the by-pass is ON (any option) you then can manually turn your lights ON or OFF as you wish and it will stay that way until you turn the by-pass OFF. When you turn the by-pass OFF it will evaluate your site conditions and preform the correct action. FAQ question below for more information on the by-pass.

Q: By-pass 101 - Every thing to know about the by-pass and how to use the “Trigger Sensor By-pass” without having a physical switch?

A: Please Click Here

Hope this helps.

Blacky :smiley:

Nice one thanks for letting us know.

Blacky :smiley:

@VCTGomes

Thanks

In HA the switch and the light are one entity. When you add the light in, motion can turn it ON / OFF then you can’t have the switch do something different as it is the one entity. Example, when motion turn on the “Light / Switch” it need to preform a set of actions and then turn it OFF. If you turn on the “Light / Switch” you can’t have this as a trigger to then run a different set of actions as this is what motion does. So we need to use a separate entity that will preform the actions we would like to do. This is the by-pass. If your light is turned ON by a relay then it is like any light you turn on in HA. The by-pass will turn ON or OFF the relay / light depending on the option you use in the by-pass.

Then you will need to choose option 1 in the by-pass.

Q: By-pass 101 - Every thing to know about the by-pass and how to use the “Trigger Sensor By-pass” without having a physical switch?

A: Please Click Here

Blacky :smiley:

FAQ - Understanding Group Functionality For The Trigger Sensor

To find out more about Groups from the official Home Assistant website please Click Here

How Groups Operate:

In a group of motion or binary sensors, each sensor possesses both an ON and OFF state. While Home Assistant (HA) may represent these states differently (e.g., clear/detected), fundamentally, they are binary. Grouping these sensors effectively merges them into a single entity. If any sensor within the group is ON, the group itself is considered ON. Despite potential overlaps, as long as at least one sensor remains ON, the group maintains an ON status. Conversely, if all sensors are OFF, the group also switches to an OFF state.

Purpose of Utilizing Groups:

When automations are triggered by sensor activity within a collection of sensors, the focus typically remains on the initial sensor that activated the automation. Subsequent activations from other sensors within the same collection might be overlooked, as the automation remains fixated on the primary trigger. Consequently, when the primary sensor deactivates, the automation is completed / ends, even if other sensors within the collection are still active. To re-engage these additional sensors, they must deactivate and reactivate once all sensors return to an inactive state.

Grouping addresses this issue by consolidating sensors. When the initial sensor triggers an automation, the group remains ON. If another sensor within the group activates before the initial sensor deactivates, the group status remains unaffected. Even when the initial sensor deactivates, as long as other sensors remain active, the group remains ON until all sensors return to an OFF state.

Testing Group Functionality: To ensure the effectiveness of your group, integrate it into a dashboard alongside with the individual sensors used in the group. By triggering individual sensors and observing the group’s response, any discrepancies or patterns hindering functionality can be identified. This allows for targeted troubleshooting and optimization of the group.

How to create a group of binary sensors to be used in the trigger sensor input Click Here

Hope this gives you a better understand of groups and why we use them for the trigger sensor.

Enjoy

Blacky :grinning:

Back to FAQ: Click Here

Back to “The Settings & Best Practice Guidelines” Click Here

@harryfine

Hi Harry :smiley:

I have just did a FAQ on groups. Have a read of it and please if you are still having any problems or this helped you then just let us know.

Also can you provide us your YAML again.

Blacky :smiley:

I am still struggling with the best way to have my lights at a default state and have the Sensor Light blueprint brighten them when it is triggered.

I was thinking, maybe you can add an option to save and restore the state of the entities in a scene? HA allows to create and use scenes on demand.

I tried to keep it simple for my testing setup:

alias: Sensor Light - Achtertuin v3
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.achtertuin_motion_sensor_occupancy
    light_switch:
      entity_id: light.z2m_group_buiten_achtertuin
    end_scenes:
      - scene.achtertuin_10
    include_light_control:
      - use_brightness

The scene also as quite simple:

- id: '1706087837296'
  name: Achtertuin 10%
  entities:
    light.z2m_group_buiten_achtertuin:
      brightness: 128
      color_temp_kelvin: 2000
      friendly_name: Achtertuin
      state: 'on'
  icon: mdi:palm-tree
  metadata: {}

When the lights are off and motion is triggered, they turn on at 100% like expected. After the timeout the scene gets activated, also expected. But at the next motion trigger, nothing seems to happen.

The trace of the automation looks like this:

Not sure if there is anything else I can share.

I will PM you

Blacky :smiley:

Updated my post with some more info!

@fbloemhof

Hi Fred, thanks for the information. The reason why it is doing this is because when you trigger it again the automation see the light is ON because the end scene set it at 10%.

The way we can make this work is to create another scene with the lights at 100%. Then remove the light from “Lights - Switches - Scenes - Scripts” and enter in the scene of 100%.

It should then work.

More work is being done with scenes and scripts, so keep an eye out for any updates.

Blacky :smiley:

Is there a solution to the following. I recently swapped some Hue warm white/white bulbs for Ikea Tradfri Color bulbs in two rooms. Since the change, they have no brightness gradient when switched on and every time a movement is detected, the light dims briefly and then brightens again.

What I’ve found out so far is what happens when Dynamic Lightning is activated. If I deactivate Dynamic lightning, everything works again with the Ikea bulbs. If “Use The Light Control Options (Optional)” is deactivated with “transition”, which would otherwise be activated, then the duration of the darkening and brightening during movement will also be shorter when the light is on.

Why is that? What is different about Dynamic Lightning when it is activated? I use the “5”.

In the hallway I have the identical configuration but with Hue bulbs, so these problems don’t exist there. So it must also be hardware related? But as soon as Dynamic Lightning is deactivated it works with the Tradfri without these problems.

I would like to continue to have different brightness and color settings throughout the day, ideally without any problems. So far it’s been working great with the position of the sun

@drdiablo1337

When we use dynamic lighting the “Use The Light Control Options (Optional)” can still be active depending on your selection. If your lights don’t like transition then dont enable it in “Use The Light Control Options (Optional)” when using dynamic lighting.

Q: Can you provide more information on how dynamic lighting works?

A: Please Click Here.

Blacky :smiley:

I am still struggling with the by-pass options.
I want to have a manual override to switch the light on and off in my room using a physical smart switch with two buttons (on and off button) in case it is too dark in the room while the sunset setting condition and/or time option is not met (e.g on a cloudy day or in the middle of the night). When the last manual light switch condition is off button, the motion sensor and the sunset condition setting must take over the light on task.
From what I understand is that checking any by-pass option all automations stops working.
The automations must be on hold as long the light has manually been switched on and get active when the light is manually switched off.
Hope this better explains what I try to achieve.

1 Like

This works indeed, thanks!

Looking forward to the next updates

Hoping to get some help with an automation I’d like to setup and am struggling with :pray:

My living room is split into two areas - Lounge and Dining. I have a motion sensor and a mmwave presence sensor (grouped by a helper) check if anyone comes in/out and remains in the room.

Essentially what I’m trying to create is an automation that turns on the lights in both sections when someone walks into the room and follows the Dynamic Lighting Option from this blueprint. However, I would then like the light in each section to follow different logic, like so:

  • Before sunset, lights in Lounge and Dining follow Dynamic Lighting
  • After sunset, Dining lights are triggered by a specific Presence zone sensor (Dining Table) that raises the brightness of the lights to whatever the Dynamic Lighting is at when someone walks near the dining table and then dims them to 15% when no presence is detected for that sensor
  • If presence is still detected in the Living Room, then the Dining area will continue to keep lights at 15% until the Dining Table sensor is triggered again
  • Then, when no presence/motion is detected in the Living Room after 15 mins, lights in both areas turn off completely after sunset.

I suppose this needs to be a series of different automation (maybe with scenes?), but I’m struggling to get my head around how to automate the presence in the Dining area while still having it follow the Dynamic Lighting Opiton in step with the Lounge area.

Any ideas anyone?

@Fred54

All the by-pass options (1, 2 or 3) will allow manual control of your light and disable the triggers / conditions. Each option only relates to what happens when you turn the by-pass ON (what would you like to do). When you turn it OFF the automation is enabled allowing the triggers / conditions to trigger the automation.

You don’t need 2 buttons. You can use one button to turn the by-pass ON and OFF.

Hope this helps.

Blacky :smiley:

@fbloemhof

Nice one thanks for letting us know.

Blacky :smiley:

1 Like

@milkplus

You could try and use a script and enter it in the “Scenes - Scripts To Turn OFF” as everything you are asking is related to the OFF part. Example for your OFF script.

  1. When it is between sunrise and sunset lights OFF.
  2. When it is between sunset and sunrise and no presence detected in dining room the set light to 15% for 15min then turn OFF if no detection in living room.
  3. When it is between sunset and sunrise no detection in living room and dining room then lights OFF.

I did this logic realy fast so my logic could be wrong but hopefully you get the idea.

Blacky :smiley:

ahh i didn’t even consider using a script! what a good idea - thank you! I will give it a go and see what i can figure out.

1 Like