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 - 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
-
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.
-
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.
-
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.
-
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â.
-
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.
-
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.
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.
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 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.
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
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.