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

What are you trying to achieve? The FP2 does presence detection, so you don’t need to move.

I have configured two zones (dining table and stove), using the Sensor Light blueprint three times. The dining table light is instant on when we sit at the table and turns of five minutes after we left it.

Be aware that the configuration of the FP2 is quite sensitive. It took me a while before I had it stable. Stil experiencing some issues when multiple persons are present sometimes.

did you find a solution

No. The motion component of this blueprint triggers the lights to turn on and off but the dynamic lighting doesn’t want to work.

1 Like

Hi @Blacky I have one issue with this automation, I was wondering if this setup is possible in the configuration, because just looking at the options I cannot figure it out.

I would like the automation to only turn OFF the light, when it was also turned ON by it. If the light was turned on manually with a button, or from the Home Assistant UI, then it should stay on after motion is no longer detected.

This is similar to using a bypass option, but not quite.
I’m using a desk lamp as a night light in my bedroom, but the lamp has it’s own button it can be turned on with:

The issue I have right now is that I will turn the lamp on manually when I’m at the desk, then if walk around the room (triggering a motion sensor) and sit back down, the lamp turns off.

This could be solved by having a condition added to the trigger that the lamp is off, but I don’t see a way to do that in the configuration.

Thank you ! When you say, if your remote has an independent switch, do you mean a remote that controls the room lights, but has a free/not used button ?

I must say your blueprint is amazing, and i did not explore all the possibilities yet. This saves so much time and efforts.

@mrw2828 & @Adaaks

I have tested it here and it is working. What cold be happening is your lux sensor is not reporting enough. For Dynamic lighting to work it must have data from your lux sensor. Some lux sensor report every 10 - 30 min and some report on 5% change. This will not work. See the FAQ on more information.

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

A: Please Click Here.

Could both of 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:

FAQ - By-pass 101

The Bypass Feature

What is the Bypass Feature?

The bypass feature allows manual control over your automation with three options: turning lights ON, turning lights OFF, or pausing (maintaining the current state). You can enable any combination of these options based on your preference.

Can a Light Switch Be Used as a Bypass?

No, a light switch should not be used as a bypass. When the automation triggers, it will also activate the light switch. If you use the switch as a bypass, it will disable the automation every time it’s triggered, making the automation ineffective.

Why Use the Term “Bypass”?

The term “bypass” was chosen for its clarity and common usage. Unlike technical terms like “Helper” or “Input Boolean,” “bypass” is easily understood. This feature isn’t limited to Input Booleans; it can be any entity with an ON/OFF state, including binary sensors.

How to Create a Bypass Without a Physical Switch and Add It to a Dashboard

  1. Create a Bypass Helper:

    • Navigate to Settings > Devices & Services > Helpers.
    • Click on the Helpers tab, then click + CREATE HELPER and select Toggle.
    • Enter a name for the helper, such as “Sensor Light Bypass”, and click Save.
  2. Configure the Bypass in Automation:

    • Return to the automation settings.
    • In the Use The Bypass Options (Optional) section, select the desired bypass options.
    • In the corresponding Bypass Switch field, search for and select the name you created earlier (e.g., “Sensor Light Bypass”).
    • Click Save to apply the changes.
  3. Add the Bypass Switch to a Dashboard:

    • Open your dashboard and click Edit dashboard.
    • Click + ADD CARD, then choose Button or Entities.
    • In the Entity field, search for the name you created earlier (e.g., “Sensor Light Bypass”).
    • Click Save to add the card.
    • Click DONE to finalize the changes.

You now have a “Sensor Light Bypass” switch on your dashboard to manually disable the trigger sensor for your automation.

Using the Bypass in the UI (Dashboard)

1. Integrate a Physical Switch:

  • If you have a physical switch that reports its state to Home Assistant, you can add this switch directly to your dashboard.
  • This allows you to manually control the bypass by toggling the switch ON or OFF from the dashboard.

2. Create a Bypass Without a Physical Switch:

  • If you don’t have a physical switch, you can create a virtual bypass switch (see instructions on how to create a bypass without a physical switch above).

Use Bypass With a Local Switch

  • Description: Use a separate physical switch that reports its state to Home Assistant (HA). This switch is not connected to your lights; its sole purpose is to report a state change to HA.

    1. Enable Bypass for Turning Lights ON:

      • Select 1 - Enable the By-pass - Turn lights ON.
      • Enter the switch into “By-pass Switch - Turn lights ON”.
    2. Configure Bypass Time Delay (Optional):

      • This controls what happens when you turn the switch OFF. If no motion is detected (Trigger is OFF), the time delay will start, and the lights will turn OFF after the delay. If you prefer the lights to turn OFF immediately, set the time delay to “0”.
      • Setting a delay allows the motion sensor to detect motion before turning OFF the lights, preventing the lights from turning OFF and back ON again too quickly.
    3. Enable Bypass Auto OFF (Optional):

      • This option automatically turns the bypass OFF if you forget to do so manually.

    Outcome: When the switch is turned ON, the automation will be disabled, and your lights will stay ON. You can also choose options 2 or 3 based on your needs.

Unified Light Control with a Single By-pass Switch

You can use the by-pass feature with a single switch to control all your light automations at once. Choose from “Turn lights ON,” “Turn lights OFF,” or “Keep lights’ current state” for the by-pass. Activating it will apply the selected action to all linked automations simultaneously. You can manually toggle the by-pass or use the auto-off feature to reset it automatically after a set time. If using auto-off, enable it in just one automation for the single by-pass switch.

Integrate the By-pass with Other Automation’s

You can connect the by-pass feature to other automations within my blueprints, enabling you to control multiple automations with a single by-pass switch. Use the links below to explore more and enhance your smart home setup.

:infinity: Sensor Light Add On - Media & Movie Lights - House Alarm Lights - Smoke Alarm Lights & Exhaust Fans + More Utilize this blueprint to create a movie mode, utilizing the by-pass as a link. For more detailed information, click here.

:shower: Bathroom Humidity Exhaust Fan The automation link can utilize the by-pass to keep the lights on during a shower. For more information and details on my full setup of this automation, click here.

:calendar: Calendar Notifications & Actions The by-pass can be utilized in this blueprint to enable different sets of lights for various calendar events such as Halloween, Christmas, New Year, Sporting Days, Easter, Parties, etc. For more information, click here.

:round_pushpin: State Notifications & Actions Similar to a calendar event but use a state change.

Conclusion

Hopefully this has given you enough information so you can better understand the power of the by-pass. Now it is up to you and how you would like to use it.

Enjoy

Blacky :grinning:

Back to FAQ: Click Here

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

2 Likes

@Asalas88

Can you provide us the condition you would like to use.

Blacky :smiley:

@Anaconda

No problem, happy to help.

You talked about using your remote… and this remote turns the light ON and OFF. If your remote has a spare button / switch that when you push it HA see and ON and OFF state. This spare button / switch controls nothing. If you have this then you can use that button / switch on your remote to turn the by-pass ON and OFF. You would then put that button / switch into the automation. In the automation you would select “1 - Enable the By-pass - Turn lights ON” and enter that button / switch entity into “By-pass Switch - Turn lights ON”. Now when you turn ON the by-pass using that button / switch the light will come ON and stay ON (unless you manually turn it OFF). When you turn it OFF the automation will evaluate your site conditions and prereform the correct action. You all so have a “By-pass - Time Delay”. When your turn the by-pass OFF if no motion is detected the time delay will start and turn your light OFF. So if you would like it to go OFF instantly then you would set the “By-pass - Time Delay” to “0”. Now you have a button / switch on your remote that will work like an sort of dumb light switch.

Hope this make sense

Glad you like it and thanks for your kind words. :smiling_face_with_three_hearts:

Blacky :smiley:

Thank you, I think I understood, but will have to try to be sure. So many options, You rock !!!

1 Like

Thanks, @Blacky . It does look like the lux sensor probably only reports when it detects a change, so that seems likely to be the problem. Do you have a lux sensor recommendation?

Here is the YAML just in case it is a code related issue

alias: Sensor Light office
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.lumi_lumi_sensor_motion_aq2_motion
    light_switch:
      entity_id: scene.office_work
    time_delay: 15.5
    include_light_control: []
    end_scenes:
      - scene.office_office_off
    include_dynamic_lighting:
      - enable_dynamic_lighting_brightness
    dynamic_lighting_lux_sensor: sensor.lumi_lumi_sensor_motion_aq2_illuminance
    dynamic_lighting_max_lux: 300
    include_time: time_enabled
    after_time: "07:00:00"
    before_time: "18:00:00"
    dynamic_lighting_heartbeat: 1

Hey @mrw2828, I happen to have the same motion sensor, and yeah the lux meter on that motion sensor is extremely unreliable.

I’d recommend an Aqara T1 Light Sensor to complement your setup, been working flawlessly for me for a year now.

I think just the condition that the light is off when motion is detected would be enough to solve my issue.

If the lamp is already on, the automation doesn’t trigger and doesn’t start the timer and turn the lamp off.

But I’m not sure if that wouldn’t mess up reseting the timer. If the automation triggers and then motion is detected on and off while the lamp is on, it should extend the time

@mrw2828

Hi Matt,

If that is the case then that will be okay. Let try to get it to work with what you have first, if your not happy then you can look into another lux sensor. Even 5% may be okay just realy depends on your range and how it works (fade in fade out).

All your settings for “Dynamic Lighting” are good. The good news is I can see your are using a scene… this is where the problem is as dynamic lighting will not control a scene. You will need to remove the scene and add entities. Dynamic lighting will only work with light (domain) entities.

Let us know how you go.

Blacky :smiley:

1 Like

@Asalas88

Yes this will not work. I have gone down the rabbit hole on this before and always find there are a few things that just don’t work. The are so many options and they all have to work together. I will look at it again.

Don’t under estimate the power of the by-pass. I would recommend that you have a separate switch. You could even use a Shelly BLU Button1 (note, I don’t have one so I can’t recommend it) or something similar or ESPHome so you have a nice independent switch. Keep it in your desk draw. Then use option 1 in the bypass (Turn lights ON) with this button when you would like to manually turn it ON. You will then also have and auto OFF option if you forget to turn the light OFF and a by-pass time delay when your turn it OFF allowing you time to walk out of the room or time to trigger the motion sensor again. I think if you do this you will see it is a realy nice feature.

Blacky :smiley:

I have an issue with a hue motion sensor in a bathroom, I have created a bypass input boolean entity for the dashboard, however, as soon as I enable the option “by pass , keep the lights current state”, the lights are no more turned off when no motion even if the bypass is not activated (only the option is enabled). For information, the lights to be turned on/off in the bathroom are added in the adaptive lighting integration. Any idea plz what could be the problem ?

I have the same setup for the room with the fp2 and no issue with it (No adaptive lighting for these, which are connected to HA through Hue Hub). The problem is only for the bathroom.

@Anaconda

If you turn any of the by-pass ON, then the automation will be disabled. You can manually turn the lights ON and OFF but if the by-pass is ON the automation will not run. When you turn the by-pass OFF then the automation will run. Regards to adaptive lighting integration, I don’t use it and never have so I have no idea.

Blacky :smiley:

Ahah, thanks @Blacky. I will try replacing the scenes with the lights and report back!

@Blacky it works!!! Thanks again for the support and for making this.

Hi, very nice blueprint, thanks for your great work :+1:

One question: currently, if sunset for the nightlight mode is active, the light changes if there is another scene selected for the night. Is it possible to only switch to the nightlight scene if the motion sensor is activated the next time, not when light is still on from before sunset?