I have a question regarding the motion sensor options.
Does the light automatically turn off when the motion sensor state changes to âclearâ (no motion detected)?
I used the HA BP âmotion-activated lightâ previously but it did not let, or I couldnât figure how, to include brightness and transition. But I liked the way that BP had the lights turn off when no motion was detected. And then you had the timer delaying the off action after no motion detected.
In the FAQ, if I read it correctly, the timer starts when the automation triggers the lights to turn on. And if the motion sensor is continuously in state âoccupiedâ the timer will turn off the light. And it wonât turn the lights on until the motion sensor state toggles. Is my understanding correct?
I also want to add a vote for the nighttime feature.
My use case:
I have a walk in closet with a motion sensor.
I want the lights to turn on when motion is detected. And stay on for 2 min after no motion detected.
The turn on attributes (brightness and transition) should be different after 10PM and before 8AM.
Welcome to the community and thanks for your kind words.
I will go directly to your use case and thanks for providing this as it helps me help you.
This blueprint helps if you have doors with a contact sensor.
If you have a walk in closet that is open with a motion sensor in it then look at my Sensor Light blueprint. Set it up for the lights you like normally and then use the night lights option with the time condition setting 10pm to 8am. Night lights is where you set your different lights and brightness for those times. It will be perfect for what you are trying to do.
If I got it wrong just let us know and I try and help again.
Any update on adding a night time option to the lights? The blueprint is really great just struggling with blinding myself when I open the closet at night.
I havenât forgotten about you. I have updated this blueprint and am now just doing the final touches. Itâs all ready to go, and I think it looks really nice. Youâll understand why it took so long once you see it, as there were other developments that had to be completed first. Keep an eye out for the update, and let me know what you think.
Thank you for being patient. As they say, âAll good things come to those who wait.â
Light Colour: You now have the option to select RGB, RGBW or RGBWW in your light control option.
Night Lights - You can now set different lights for night time.
Collapsible Sections - Added collapsible sections to the blueprint. This enhancement improves the blueprint user interface by making it cleaner and more organized, allowing sections to be collapsed.
This feature was introduced in Home Assistant 2024.6, so you must have this version or later for the blueprint to work.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Thank you so much for making the updates. Iâm traveling right now but will try it out once I get back to my casa. Looking through the blueprint I can see why it took so long and how my probablity of modifying it myself was zero.
First, thank you so much for your amazing blueprints! Iâve been using several of your creations, including the Closet, Pantry, and Cupboard Lighting, and theyâre fantastic.
I have an issue: at the end of the automation, the lights always turn off, even if they were initially on before it started.
For example, this happens at night when all lights are on and I open the closet. The assigned lights change the brightness (as part of the automation). After the automation ends, the light turns off, even though they were on before. After that, the brightness that was set before remains. Am I missing something to keep them on if they were originally on?
Am I missing something to keep them on if they were originally on?
Typically, when you open a closet, pantry, or cupboard, youâd want the light inside to turn ON. If youâve set a time delay, the light will turn OFF after that period, even if it was ON before⊠thatâs how the automation works. Without the time delay, the light will simply stay ON until manually turned OFF or you close the door.
When using a time delay and linking a motion sensor, the light will stay ON as long as motion is detected. If you leave the door open and exit the room, the light will turn OFF once the motion sensor becomes inactive. If you re-enter and motion is detected while the door is still open, the light will turn ON again. However, if you close the door, the light will remain OFF.
I have used some of your previous blueprints and have loved how well they work in every day life. This particular one seemed an elegant solution to a simple conditional automation I had made in the past.
Logger: homeassistant.components.automation.office_closet_light_sensing
Source: components/automation/init.py:688
integration: Automation (documentation, issues)
First occurred: 20:54:05 (23 occurrences)
Last logged: 21:05:18
Error rendering variables: UndefinedError: âdict objectâ has no attribute âentity_idâ
I have a simple setup of just a contact sensor on the door to a closet, with one ceiling fixture of a smart bulb. For whatever reason the automation was not triggering even though the contact sensor events were operating properly.
Iâm not sure what this error means that I found in my logs.
Have a look at your light and it must only be an entity not a device. This is a link to my sensor light blueprint FAQ but it is all the same. Click Here
If that doesnât work 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.
What I donât really understand is that when I check the logs for the door open sensor, it provides the correct states of closed / open, so I that it would be appropriate to trigger the automation, but when I look at the automations section in HA it states the automation has never been triggered. And I believe my entity for the light bulb is correct; I can independently turn the light on and off through HA so I believe it is functioning correctly.
Blacky, thanks for making this Blueprint. I have an Aoetec door sensor and Sengled bulb. Iâm trying to configure the sensor to trigger the light for 2 min when the door opens between 5pm-6:30am. The light comes on but when the door closes the light goes off. Iâd like it to stay on for the full 2 minutes. Is that possible?
This blueprint will turn OFF the light when the door closes and it doesnât have a time condition to run only between 5pm and 6:30am.
You could look at my Sensor Light blueprint as that has a time condition and it will keep the light ON for X amount of time when the door closes. The only thing is if you leave the door open the light will remain ON. To resolve this you may consider using a motion sensor rather than a door sensor, that way the light will turn OFF. If you would like to keep your door sensor and there is a possibility the door is left open hence the light staying ON then you may consider creating a template sensor that when the door opens it turns ON but then has a auto OFF just encase you leave the door open.
Small feature suggestion here.
Would it be possible to have a delay OFF feature for lights when the sensor turns to âclosedâ state? Like, the lights will only turn off if the sensorâs state is set to âclosedâ for a specified amount of time.
I would like to use this blueprint for the lights of my attic coupled with a reed sensor on the trap door.
I just want to make sure the lights could stay on for a short while if the trap door closes by mistake while someone is up there.
Why not use my Sensor Light blueprint. Use your reed sensor on the trap door as the trigger (if you cant select it copy paste the entity ID into the input), add your lights and set the delay to your liking.