One extension of the sensor light blueprint that I have had to put in is that I donât want the automation to kick immediately. I have a bed sensor which I use as bypass_enabled_turn_off/motion_bypass_lights_off. This has a side effect of turning on the lights if I get up in the middle of the night to use the restroom or get water â which I donât want. Theyâre not dimmable lights.
I added a new helper entity and automation and entity that uses the bedsensor + 10 minutes as a state_control_entity so it basically buffers the bed sensor by 10 minutes.
My question is should i continue using the new boolean helper entity as the state_control_entity or just replace my motion_bypass_light_off entity with the helper?
@Blacky
First time posting in the forums! Be kind
I have come across your wonderful blueprints and have just started to use your Sensor Light blueprint.
I am struggling to work out how to achieve something: we live in a barn conversion with walls that are over a metre thick and need lighting all day long even in the summer months.
In our open plan kitchen I would like our lights (multiple) to switch on with motion and go off when there is no motion before sunset, but after sunset I would like the lights not to go out but just to dim down to say 25%.
Is this possible?
Why not use the bed sensor to control the automation instead? Have it disable the automation when you first get into bed, then re-enable it in the morning when you get up.
Then use the Time condition to define when the automation is allowed to run.
For example, I normally go to bed between 10:00 pm and 11:30 pm , and if I get up during the night itâs usually 3-6 hours later . So I could set the time condition to allow the automation to run from 6:30 am to 1:00 am . That means if I get up between 1:00 am and 6:30 am , the automation wonât trigger, so the lights stay off.
Obviously those times are just an example. Adjust them to match your own routine so the lights donât turn on when you get up during the night.
Try and use the night lights with the night light sun condition and also with glow lights. Set your glow lights to 25% so they will be ON all night. Your night lights could also be 25% but you could increase it to 40% or anything you like. That way when the sun sets your lights will come on to 25%⌠if your motion sensor is triggered at night they could go to 40% then back to 25% when no motion is detected.Then during the day the normal lights would be triggered when motion is detected at the setting you choose say 100%.
If your still unsure try your best then 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.
Hi @Blacky
Thanks for the guidance. I did not know whether or not to create a sunset toggle helper and have state control.
I have been also looking at using a script to switch on various types of lights at various brightnesses with an off script with an if-then statement for if before sunset > off, if after sunset > set lower brightness.
I will have a play around and if I struggle I will post my YAML here.
Many thanks!
Andrew
Iâm new to home automation and obviously to Home Assistant and Iâm setting up lighting automation one room at a time. For the first room Iâm using the existing (dumb) lights with FP300 presence & lumen sensors and there is also an Aqara H1 switch, which I currently have in decoupled mode. I discovered your amazing blueprint and it seems totally complete and has every option that I could conceive of wanting. So thank you very much for producing this.
Normally I would expect the light to come on when itâs dark and someone walks into the room. And obviously when someone leaves the room after a short period, the lights would go out. BUT somehow or other I would expect the light switch to be able to override this by manually turning the lights on or turning the lights off. Though an empty room should still cause the lights to go off.
I suspect that the bypass feature of the blueprint might be the way to go. There is a warning in the documentation not to use the same entity for a bypass switch as is used to control the lights. But I assume that by using a decoupled switch, that warning doesnât really apply.
Does anyone have any suggestions or guidance as to how the physical smart switch could or should be used? All advice will be very gratefully received as I work my way through this powerful new set of capabilities.
Yes, this is all possible. You have two main options:
Sun Elevation â Use the Sun Elevation option so when the sun goes down and it becomes dark enough, the automation becomes active and will allow the lights to turn on.
Ambient Light â Use the Ambient option with a lux sensor to measure the roomâs light level. Once the measured lux drops below your configured threshold, the automation becomes active and will allow the lights to turn on.
Yes, a decoupled switch is the way to go, but there are a few limitations to be aware of.
You would use the switch as Bypass Option 1. When the switch is turned ON, the light turns ON and the automation is bypassed. This means the motion sensor will no longer control the light, and any Sun Elevation or Ambient Light conditions are also ignored.
When you turn the switch OFF, the light may turn OFF immediately if no motion is detected. But, you can use the Bypass - Time Delay option to keep the light on for a short period, giving you time to leave the room or allowing the motion sensor to detect movement again before the light turns off. It is just a bit of a buffer you can utilize.
Regarding the empty room, because the automation is bypassed while the switch is ON, the light will remain ON even if the room becomes empty (the motion sensor is clear). This is one of the limitations of using a bypass⌠if you forget to turn the switch OFF, the light will remain ON. To overcome this, you can enable the Bypass Auto OFF Option, which will automatically turn the bypass OFF after the configured Bypass Auto OFF - Time Delay.
Thank you for this. It helped a lot and I have managed to achieve exactly what I was looking to do.
I have two input boolean toggles, one to manually force the light on and one to manually force off, which are set up in the bypass section of the configuration of the blueprint. I then have two automations. One is triggered by a press of the physical light switch, which will set exactly one of those two toggles to true based on whether the light is currently on or not (If-Then-Else). And the other automation is triggered by the presence sensor for âOccupancy: Clearâ , resetting both the toggles to false to revert to automatic operation when the room becomes empty.
So now I have a fully automated room light that will be used most of the time but I still have the ability to manually override it by physically switching the switch on the wall. And the manual override persists (and can be switched) until everyone leaves the room, at which point the automation returns to automatic
Your blueprint has worked amazingly in achieving this, so thank you very much.
First of all, thank you so much for all your effort on this, itâs been essential in me slowly swapping over to Home Assistant from Hubitat. Iâve had a few things that have popped up during me setting things up that you might be able to shed some light on and hopefully they havenât already been covered (I havenât been able to find anything). For context, all lights and motion sensors are Philips Hue products and theyâve been added to HA through the Hue Hub integration, this may be the source of my problems but Iâm not too sure.
Is there any way to have an entity pause the dim before off function. For example, having a TV light strip being on will pause the countdown and only will it restart once the light strip is off. Iâve tinkered around with the baypasses and state controls but they all just end up turning everything off once the strip turns off instead of just allowing the lights to stay on and the automation to return to normal from the countdown part.
When using a motion sensor to activate a light, once the sensor stops detecting motion but the lights are still on, any kind of motion will cause the lights to raise up to 100% brightness for a moment before going to their desired state. Everything I have tried does not seem to help (from creating scenes in HA to setting specific brightness levels) and it seems to be directly tied to the sensor going from a no motion to motion detected state. If this is something that can be worked around through Sensor Light itself Iâm not too sure but any insight into this would be brilliant.
Apologies for the long post but thanks again for all your efforts and hopefully you might have some clues on how I can get everything up and running!
If you use bypass option 3 it will pause the automation or keep it in itâs current state. If the dim before option is active (lights dimmed) and you turn ON this bypass (TV light strip) the lights will resume the normal setting before it was dimmed. If you then turn OFF the bypass (TV light strip) the light will turn OFF⌠only if the motion sensor is clear. You do have an option to use the Bypass - Time Delay so if you motion sensor is clear it will wait for this delay before turning OFF the lights. If the motion sensor is active then the lights will stay ON or if the motion sensor becomes active in the Bypass - Time Delay period the light will stay ON.
I will relate this question to using an entity, as scenes can be different depending if you used the Scenes & Scripts - Toggle Helper. If your motion sensor turns the light ON to a set brightness and the motion sensor goes clear to then detected the light will remain the same. Even if you change the brightness manually once the light is ON. Once the light is ON we wont send it another action. If your using the dim before OFF option and the lights dim then if dimmed and the motion sensor becomes detected again the lights will resume their normal brightness they were set on before it was dimmed.
If you would like me to look at your settings 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.
For the first one, that Bypass - Time Delay worked like a charm, thank you so much!
As for the second, my main issue is that no matter what I attempt, the lights will turn on at the correct value initially (80% in this case) and once motion is detected a second time, the brightness will boost straight to 100% and stay there (it will only correct back down if I combine it with a scene but that will cause the quick rise to 100% before lowing again mentioned in my initial post). If I strictly use entities, it will turn on correctly then always max out the brightness on the second detection. Iâll attach my YAML configuration to look over but nothing is standing out to me that should cause this issue. Iâm not sure if this is an issue with the command being sent to the Hue hub or something else but I just canât seem to figure it out so any insight would be super appreciated.
Thanks for your settings, this makes it easy. In Light Control because your using Dim before OFF you must select a toggle helper in Dim Before OFF - Toggle Helper. Once you have done this you should be all good to go.
Oh wow, I was under the impression that I had to connect a helper up to an automation of some type outside of Sensor Light but just creating an empty one and linking it has fixed everything. Thank you for all your help and for responding so quickly, youâre a gem!
I have outside lights that currently dim to 20% for nightglow, but if there is motion - they donât go up to 70% during the nightglow period, they do go up to 70% after nightglow time. Is there an easy way to fix it? I must be missing some setting.
Your using scripts. Can I ask what is happening in your script. If your just turning ON some lights to a set brightness and or colour temp then it will be easier to jut use the light entity and let the blueprint do the rest. It will work with scripts but sometimes people use them just to set a brightness level and is not needed. If you use light entities then dynamic lighting will work and that is my next point.
Scripts donât work in dynamic lighting so your settings for DL will be doing nothing.
The question that you having problems with is in Night Lights. You are using a script that indicates the lights will be set to 25%. You also using this same script for your Night Glow - Lights. This is why your not seeing any change. In Night Lights you should have a script that is 70% and in Night Glow - Lights you can keep the script for 25%. Then test it out and it should work.
@Blacky I literally created an account here to thank you for your work on the blueprints and also to ask for a little advice, specifically regarding the Bypass function.
At first, after setting up the blueprint I couldnât get anything to trigger, but after systematically disabling things I confirmed it was the bypass I had configured.
In a nutshell, I wanted a button on my IKEA smart switch to temporarily disable the motion activation and keep the lights on for the set period of time, before reverting back to normal. Here is a screenshot of what I configured:
The bypass must be a switch with an ON/OFF state, but youâve selected a button.
A button only fires an event when itâs pressed⌠it doesnât have an ON or OFF state. The automation needs to know whether the bypass is currently ON or OFF, so a button canât be used directly.
The solution is to create a toggle helper:
Navigate to Settings > Devices & Services > Helpers .
Click the Helpers tab, then click + CREATE HELPER and select Toggle .
Give the helper a name (e.g., Family Bathroom Lights Bypass ) and click Save .
Now replace your button entity in the bypass input with this new toggle helper.
Now, whenever you press the button, it will toggle the helper ON or OFF, allowing the bypass to work correctly, including the Bypass Auto OFF Option . This works because the toggle helper has an ON/OFF state and automation can only turn a switch (or toggle helper) OFF⌠it canât turn OFF a button.