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.
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.
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
FAQ - Bypass 101
What Is the Bypass Option?
The Bypass Option allows you to manually control your automation and override its normal behavior. By switching on the bypass, you disable the automationâs automatic actions and take full control over your lights. This feature is useful when you need to temporarily stop automations from running or want to override their settings based on specific needs.
You have three input options:
- Turn Lights ON: This will turn your lights on, regardless of the automationâs current state.
- Turn Lights OFF: This will turn your lights off, disabling the automationâs control over them.
- Keep the Lightsâ Current State (Pause): This option ensures that the lights remain in their current state (whether they are on or off) and the automation is paused.
You can have more than one bypass and choose any input option based on your preference. However, ensure that you DONâT use the same bypass entity in more than one option. Each option must have a separate entity.
Why Not to Use The Same Light Switch Entity as a Bypass?
Using the same light switch that your automation controls (Turns ON and OFF) as a bypass will cause conflicts. When the automation triggers, it turns the light ON, which also enables the bypass and disables the automation. This creates a feedback loop, rendering the automation unreliable and ineffective.
To avoid this, always use a separate, independent entity, such as a virtual helper or a dedicated physical switch as the bypass. This approach ensures your automations function seamlessly without interference.
If youâd like to use the same light switch, I have another blueprint that allows you to do so. Itâs called Manual Control Status Tracker , be sure to check it out!
Why Call It âBypassâ?
The term âbypassâ is intuitive and widely understood, making it accessible to users. Unlike technical terms like âHelperâ or âInput Boolean,â âbypassâ communicates its function clearly. It can refer to any entity with an ON/OFF state, such as binary sensors, helpers, or a switch.
How to Set Up a Bypass Without a Physical Switch
1. Create a Bypass Helper
- Navigate to Settings > Devices & Services > Helpers.
- Click the Helpers tab, then click + CREATE HELPER and select Toggle.
- Name the helper (e.g., âSensor Light Bypassâ) and click Save.
2. Configure the Bypass in Automation
- Go to your automation settings.
- In the Bypass Options (Optional) section, select the desired bypass option(s).
- In the Bypass Switch field, search for and select your helper (e.g., âSensor Light Bypassâ).
- Click Save to apply the changes.
3. Add the Bypass to Your Dashboard
- Open your dashboard and click Edit Dashboard.
- Click + ADD CARD, then select Button or Entities.
- Search for your helper in the Entity field (e.g., âSensor Light Bypassâ).
- Click Save to add the card, then click DONE.
You now have a Sensor Light Bypass switch on your dashboard to manually manage the automation.
Can I Use a Physical Switch?
Yes, you can use a physical switch as long as itâs not the light switch used in the automation. Instead, it should be an independent switch that reports its state to Home Assistant.
Option 1: Use a Physical Switch
- Go to your automation settings.
- In the Bypass Options (Optional) section, select the desired bypass option(s).
- In the Bypass Switch field, search for your physical switch entity and add it.
- Click Save to apply the changes.
Option 2: Use a Virtual Switch
- If no physical switch is available, create a virtual bypass switch (see instructions above).
Bypass - Time Delay
This option is used in two bypass scenarios:
- When the lights are already ON and the bypass is enabled to turn them OFF.
- When the bypass is turned OFF, the trigger sensor is OFF, and the lights are still ON.
In both scenarios, the automation will turn the lights OFF after the set time delay.
The Bypass Auto OFF Option
The Bypass Auto OFF option allows the bypass to automatically turn OFF after a set time delay. You can choose which bypass option you want to apply the auto OFF feature to:
- Turn lights ON
- Turn lights OFF
- Keep the lightsâ current state (pause)
Once selected, set the Bypass Auto OFF time delay. The time delay will start from the last time the bypass was turned ON, automatically turning it off after the specified time.
Unified Light Control with a Single Bypass Switch
A single bypass switch can manage multiple linked automations simultaneously. Simply add the same bypass to each automation you want to control. Then, decide what action the bypass will take when turned ON:
- Turn lights ON
- Turn lights OFF
- Keep the lightsâ current state (pause)
This feature is especially useful when you need to override all automations at once. Common scenarios include:
- Cleaning mode: Turn all lights ON to ensure visibility.
- Hosting friends: Turn all lights ON for a party.
- House alarm: Turn all lights ON for security purposes. Light your whole house inside and out. This ensures better visibility for your security cameras to capture crucial details.
- Sleep mode: Turn all lights OFF when preparing for bed.
If youâre using the Auto-OFF feature, make sure itâs enabled in only one automation for the shared bypass switch. This prevents multiple automations from trying to turn OFF the bypass simultaneously, ensuring smooth operation.
Integrating the Bypass with Other Automations
Some of my blueprints are designed to work seamlessly with the bypass feature through an Automation Link. This allows you to extend your automations, giving you more control and flexibility while ensuring they work together effectively.
Use this blueprint to create a movie mode by linking the bypass. For more detailed information, click here.
This automation can use the bypass to keep the lights on during a shower. For more information and a complete setup guide, click here .
Conclusion
Hopefully, this guide has given you a better understanding of the power of the bypass feature. Now it is up to you how you would like to use it and integrate it into your smart home setup.
Enjoy
Blacky
Back to FAQ: Click Here
Back to âThe Settings & Best Practice Guidelinesâ Click Here
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.
Blacky
Thank you, I think I understood, but will have to try to be sure. So many options, You rock !!!
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
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
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
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.
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
Hi, very nice blueprint, thanks for your great work
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?
i also noticed a change from 4.8 to 4.9 in sun conditions.
now my lights at the dining table sometimes turn off with the trigger condition sun. (whene we are eating)
4.8 worked perfectly.