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

This means the existing physical switch is useless and I need another one which is what I am trying to avoid. Or I got it wrong?

If it was a regular automation, I would put the door sensor to triggers and the light!=on to conditions. But the blueprint does not allow conditions and HA does not allow conditions on top of blueprints.

The blueprint can trigger many times when the light is ON.

Have a look at this blueprint as it probably what you are after.

:gear: Turn Light, Switch or Scene On & Off with Trigger Conditions

You can use the “Use The Entity State Option” add your door sensor and you can set any condition you like.

Blacky :smiley:

1 Like

I cannot really as there the condition applies to both when the light is off and on. If I use the light state there, the blueprint stops when the light goes on.

Hi All,

I’m relative new to Home Assistant and added the Sensor Light Blue Print and created a basic automation to turn on lights if a motion is detected. I’m using a Fibaro Motion sensor via Z-Wave and used Motion detection entity. When I look to the entity the status is changing however the automation is never been fired.
Does something special need to be configured for the Blueprint to start working ?
Thanks in advance for any replies !

@aik

It would probably be easier to just do a quick custom automation.

Blacky :smiley:

@GerryVS

Welcome to the community :wave:

Thanks for reaching out :+1:

Without seeing your YAML my gut feeling is you have selected devices and the blueprint only supports entities. Below is the FAQ on how to fix this.

Q: My Trigger Is Not Triggering The Automation?

A: Please follow these steps Click Here.

If that doesn’t resolve it then 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:

Hey @Blacky
I have an issue with Bypass tried everything :smiley: if i add something in bypass my automation stops working i just can’t figure it out why it does stop there if i have anything in bypass… even if the bypass should be off beacuse toggle used is off

 ## conditions/2/conditions/1/entity_id/0

Executed: June 2, 2024 at 13:36:54
Result:

result: false state: 'on' wanted_state: 'off'
alias: Korytarz1
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.sensorruchukorytarz1_occupancy
    light_switch:
      entity_id: light.yeelink_colorb_6ca4_light
    end_scenes:
      - scene.korytarz1off
    time_delay: 1
    include_light_control:
      - use_brightness
    include_dynamic_lighting: disable_dynamic_lighting
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.sensorruchukorytarz1_illuminance_lux
    ambient_light_options: ambient_light_option_disabled
    ambient_light_high_value: 620
    include_night_lights: night_lights_enabled
    night_time_delay: 0.5
    include_night_light_control:
      - use_brightness
    night_lights_conditions:
      - time_enabled
    night_lights_after_time: "23:00:00"
    night_lights_before_time: "07:00:00"
    ambient_light_value: 100
    light_brightness: 80
    dynamic_lighting_min_lux: 100
    include_sun: sun_disabled
    motion_bypass_lights_on:
      - automation.korytarz1helper
    include_bypass:
      - bypass_enabled_turn_on
      - bypass_enabled_turn_off
    bypass_time_delay: 0.5
    motion_bypass_lights_off:
      - automation.korytarz1helper
    include_bypass_auto_off:
      - bypass_auto_off_enabled_on
      - bypass_auto_off_enabled_off
    bypass_auto_off_delay: 30
    night_lights:
      entity_id: light.yeelink_colorb_6ca4_light

Hi Blacky,

Thanks for your response, this is the code. I selected the entity just from the list in the gui.

alias: AUTOfficeLight
description: Automation Office Light
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.motion_fib_office_motion_detection
    light_switch:
      area_id: office

When I go look under traces I also don’t see anything happen.

Cheers,
Gerry

@Monra

I have tested your yaml and it all works. Note you are using an ‘Automation’ for your bypass so it will be the toggle for the automation (enable / disable). The other thing to note is you are using the same automation as the bypass for option 1 & 2. You can’t do that as there is a conflict because when you turn ON the bypass what should it do?.. turn ON or turn OFF the lights… it cant do both.

You log show the automation enabled and not disabled. Try checking it again making sure the automation is disabled and remove one automation entity from option 1 or option 2. If there is no entities in the bypass when you remove one make sure you disable it including the auto OFF.

Also note you have a scene in ‘Scenes - Scripts To Turn OFF’ but you are using a light entity. You can have a scene there as it may be turning on a scene but I thought I would just ask / point that out.

Blacky :smiley:

@GerryVS

You are using an area in ‘Lights - Switches - Scenes - Scripts’. You can’t do that as it only works with entities. You will need to expand it down to entities (all green not orange or blue).

This FAQ shows you how to do that Click Here.

Blacky :smiley:

Hey @Blacky i did the changes Yeah the bypass for options 1 & 2 was a stupid mistake from my side but still, i don’t think there is anything wrong with the config below funny part is that if i comment all the bypass things it will work
maybe I don’t understand what bypass does because what I want to achieve is pretty simple pause the automation for let’s say 20minutes keep the light on and after 20 minutes resume the automation I could do it outside of the blueprint but I think that’s what the bypass is for, still I don’t understand why it isn’t working at all motion is detected ofc there is less lx than I set the minimum nothing happens if I press the button I’m lost :smiley: here is a full tracklog maybe you will see something https://pastebin.com/wjUXg287

alias: Korytarz2
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.senorruchukorytarz2_occupancy
    light_switch:
      entity_id: light.yeelink_colorb_e50e_light
    end_scenes:
      - scene.korytarz2off
    time_delay: 1
    include_light_control:
      - use_brightness
    include_dynamic_lighting: disable_dynamic_lighting
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.senorruchukorytarz2_illuminance_lux
    ambient_light_options: ambient_light_option_disabled
    ambient_light_high_value: 370
    include_night_lights: night_lights_enabled
    night_time_delay: 0.5
    include_night_light_control:
      - use_brightness
    night_lights_conditions:
      - time_enabled
    night_lights_after_time: "23:00:00"
    night_lights_before_time: "07:00:00"
    light_brightness: 80
    ambient_light_value: 10
    dynamic_lighting_min_lux: 10
    night_lights:
      entity_id: light.yeelink_colorb_e50e_light
    include_bypass:
      - bypass_enabled_turn_on
    motion_bypass_lights_on:
      - automation.korytarz2helper
    include_bypass_auto_off:
      - bypass_auto_off_enabled_on
    bypass_time_delay: 10

@Monra

Yep that what it will do.

I have checked it here again replacing your trigger, light and the bypass with an automation. All worked perfectly.

So lets look at a few things.

  1. We know the light is good.

  2. We know using an automation works, as long as you are toggling it ON and OFF (Enable / Disable).

  3. The trigger… the automation needs this trigger to work. Lets look at this. Can you create a toggle helper and add the toggle helper as the trigger only so copy the toggle helper ID go into the YAML and replace your “binary_sensor.senorruchukorytarz2_occupancy” id with the toggle helper ID and click save. You should only have the toggle helper in the trigger. Now test it again. If it works then we need to look at your “binary_sensor.senorruchukorytarz2_occupancy”.

  4. If that still doesn’t work then put back your “binary_sensor.senorruchukorytarz2_occupancy” removing the toggle helper and then use the toggle helper in the bypass. Toggle it ON and see what happens, toggle it OFF and see what happens. You may want to reduce both the bypass minutes to “0.1” for speed of testing.

Blacky :smiley:

New update 6.8

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

In this update, we focused exclusively on dynamic lighting bugs. Below are the changes we have made. Hope you like it :smiley:

DYNAMIC LIGHTING UPDATE

  • New Input Option :new:

    • Dynamic Lighting - Toggle Helper: If you have chosen a brightness level of 0%, then it’s essential to create an independent toggle helper and enter into dynamic lighting. This toggle helper can also address issues if the automation doesn’t behave as expected due to the occasional unavailability of light entities. While it may not always be necessary, if you’re open to creating toggle helpers, it’s highly recommended to utilize this option to ensure proper functionality of the automation.
  • Bugs Fixed :bug:

    • Fixed bugs in option 8.
    • Fixed bugs when using options 1, 2, 4, 5, 6, 7 or 8 and setting a brightness level of 0%. Dynamic lighting would stop and not come back ON. There is now a new toggle helper that is required when setting a a brightness level of 0%.

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:

Can you elaborate a bit more on toggle helpers?

@DuckDuck25

When you set up dynamic lighting with a brightness level of 0%, the light will turn off. Dynamic lighting relies on the state of the lights being “ON” to function correctly. If the lights are not detected as “ON,” dynamic lighting stops, which is not desired. By using a toggle helper, dynamic lighting will monitor the toggle helper’s state instead, ensuring it continues to run. This is why the toggle helper is necessary only when setting a brightness level of 0%. Toggle helpers in Home Assistant are reliable and don’t get lost on the network. If a light drops off momentarily when dynamic lighting checks the state, it can cause dynamic lighting to stop. Using a toggle helper ensures consistent functionality without relying on network connections.

Blacky :smiley:

That’s a pretty cool change. Thanks again so much Blacky. I had my minimum light brightness go down to 10% under Dynamic Lighting - Min Brightness Value. I am using option 4. Is there a benefit to lowering that to zero and adding the toggle helper?

I would urge everyone here to make a small donation. The support for this popular blueprint is second to none. Please support Blacky at:

Blacky’s Donation Link

And Blacky, I see they finally created the ability to collapse Blueprint sections. that will be great for Sensor Light as it has so much packed into it. I assume that we will have that new version soon after 2024.6 is released. :slight_smile:

@harryfine

Hi Harry,

Your welcome.

No, it will change the way DL works, and that might not be what you’re looking for. If you set it to 0%, then your light will/can turn OFF. Setting it at 10% means that it will be the lowest brightness value the light will have when your trigger is activated.

Because you have set it to 10%, you don’t need to use the toggle helper for DL to work. I have written the code this way so you don’t have to add a toggle helper, and it won’t break what you had before updating the BP.

If you have chosen to use a brightness value of 0% because you want the light to turn OFF, you must use a toggle helper for DL to work correctly.

I am fully aware of this. This is why we love Home Assistant: they listen to us :+1:. When I say “us,” I mean the whole community. Once the new HA is released, I will implement it here. I will then go through it in detail, test it, and report any bugs to HA. This could take some time if we find any bugs. A big shout-out to @karwosts for developing this :kissing_heart: THANKS!

I prefer to wait and allow everyone time to update their HA, as it will break the Blueprint if you are not on the latest version of Home Assistant. We want to avoid that if we can, trying to be responsible. Hopefully, when it is released, it will be a smooth transition for all and a pleasant experience.

Thanks for your patience.

Blacky :smiley:

Thanks Blacky ! I changed it to a specific light and that worked out ! I thought it was only applicable for the trigger to be an entitiy and not for the target :blush:

Thanks a lot for this great blueprint !

@Blacky I don’t know what to say i went fresh and deleted all the automation that I’ve made from blueprint imported 6.8 and it just worked… something somewhere was not happy about the setup :smiley: Thank you keep up the amazing work

@GerryVS

Nice one :+1: thanks for letting us know.

@Monra

That’s good news I am glad you finally got it working :+1:

Enjoy

Blacky :smiley: