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

New update 1.3

You have the option to set a Ambient Light Sensor and set the LUX value. This is used for adding a condition to only work when it is dark or below the Ambient Light LUX Value.

Enjoy

Blacky :grinning:

1 Like

FAQ

:warning: A good starting point is to read ‘The Settings & Best Practice Guidelines’. It is in an easy-to-follow format, and many of the FAQ links are provided for each area of the blueprint, making it easier to find what you are looking for.

Q: My Trigger Is Not Triggering The Automation?

A: Please follow these steps Click Here.

Q: How do you update the blueprint and not delete / recreate existing automations?

A: Please select below. It all depends on what version of HA you have and how you installed it.

  • For HA version 2023.12.0 + Please follow these steps Click Here
  • If you are on an older version of HA then please follow these steps Click Here.

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

A: Please Click Here.

Q: How do I create a template sensor so I can use it in the blueprint? or, How can I make the automation work better?

A: For template sensor examples Click Here

Q: Can you provide more information on “Night Lights - Entity State” condition?

A: Please Click Here

Q: How do the time options work including night lights time?

A: Please see our explanation of the time settings Click Here.

Q: Can I create special event lighting for things like Halloween, Christmas, New Year, Sporting Days, Easter, Parties, etc?

A: Yes, please follow these steps Click Here.

Q: Can I have night glow lights as I would like the lights to stay ON at night?

A: Yes, follow the automation steps. Click Here

Q: Can i have more information on how to use scenes or scripts?

A: Sure, please Click Here

Q: By-pass 101 - Every thing to know about the by-pass and how to use the “Trigger Sensor By-pass” without having a physical switch?

A: Please Click Here

Q: Why did you choose sun elevation as the sun option and not sunrise and sunset, I don’t really understand the degrees and elevation, I assume zero is the sun just on the horizon with a + being day time and a - night time.

A: Please read our explanation and how to set it up, it’s easy :slightly_smiling_face: Click Here

Q: Can I add a schedule helper or times of day sensor helper

A: Yes, for more information + Pro Tips Click Here

Q: When I add a scene to “Lights - Switches - Scenes - Scripts” or in “Night Lights” it doesn’t turn OFF?

A: If you have selected a scene or a script to be turned ON and you would like it to be turned OFF after the time delay, you must create another scene with everything OFF and enter it into the “Scenes - Scripts To Turn OFF”. See below examples.

Q: How do I create a toggle helper?

A: If you would like to know how to create a toggle helper then please click here.

Q: I have more than one trigger sensor / binary sensor and my light will come ON then it will turn OFF and stay OFF? - or - The automation is not working correctly with 2 or more trigger sensor / binary sensor and is driving you crazy?

A: Please follow these steps Click Here

Q: I would like to know more about groups how they work and why we use them as the trigger sensor.

A: Please Click Here.

Q: I have set the “Ambient Light Sensor - Site Conditions” to “YES” and the lights keep turning OFF and or the automation is not working correctly. I have only selected scenes in the “Lights - Switches - Scenes” or in “Night Lights”. Am I doing something wrong?

A: Please follow these steps Click Here

Q: I would like more information on ambient light settings?

A: Please Click Here

Q: I would like to use 2 or more ambient light sensors in the automation. Is this possible?

A: YES, please follow these steps Click Here

Q: I would like to set a different value but the slider is not letting me?

A: Just simply type the number value you would like in the field and click save. A red line will appear under the number you have entered but once you click save, exit the automation and go back into it the red line will not be there.

Q: How to set up a schedule helper and a pro tip on how to use a sun condition with a schedule helper?

A: Please click here.

UPDATES OF BLUEPRINT - When something was needed to be done when updating are below.

Q: How do you update the blueprint from version 4.5 - 4.6 to version 4.7 and above?

A: Please follow these steps Click Here

Q: How do you update the blueprint from version 3.8 - 4.4 to version 4.5?

A: Please follow these steps Click Here

Q: How do you update the blueprint from version 3.2 - 3.7 to version 3.8?

A: Please follow these steps Click Here

Q: How do you update the blueprint from version 2.9 - 3.1 to version 3.2 ?

A: Please follow these steps Click Here

Q: How do you update the blueprint from version 1.8 - 2.8 to version 2.9 ?

A: Please follow these steps Click Here

Q: How do you update the blueprint from version 1.4 - 1.7 to version 1.8 ?

A: Please follow these steps Click Here

Q: How do you update the blueprint from version 1.1 - 1.3 to version 1.4 ?

A: Please follow these steps Click Here

3 Likes

Highly appreciate your attention and you time. You rock!
I’m following this thread all the time to see what’s new :smiley:

Hey loving this blueprint! Great work

Solved this… with below.
I’m having one issue with the bypass as I do have a switch but I have it toggle a smart light on and off. So the switch doesn’t have a on or off state. Only the light does.

How can I use this option?

I have made a helper switch which works but then requires me to use the app to change it on or off. Which I’d like to use the switch as intended.

Solved.
Added toggle of the helper Boolean with the switch. So it turns light and Boolean on. And then both off when clicked again. Fixing my original issue.

I would now light to some how add light brightness as this is my garden light. Security light. So when motion triggered I want it as 100% but if I turn the light on dim and then off. Next time motion just resumes that state.
I’m guessing this would be an easy add for me but also a great option for this blueprint.
Brightness or scene

Thanks for your help. And I’m looking forward to the progress with this

Thanks for your feedback. Yep a scene will do this. I have this on the list to add. :+1:

1 Like

FAQ - How do you update the blueprint from version 1.1 - 1.3 to version 1.4 and above?

New update 1.4

You have the option to add multiple motion sensors. :+1:

Use case
You could have two or more motion sensors that turn the lights on.

  • Your driveway and your front door are apart from one another. So you have two motion sensors, one that picks up your car and the other your front door. Someone visits, light come on and when you get home from work in your car lights come on.
  • Two doors into a factory (or a large room). Two motion sensors at each door.

I think this will be useful to fix this now moving forward, but this update will hide your selection of your motion sensor from any existing sensor light automations you have. If you are starting from new then your all good and this will not affect you. But if you are upgrading from Versions 1.1, 1.2 & 1.3 you can fix it easily. You have 2 options.

  • Delete your existing sensor light automation (not the blueprint), update the blueprint and then add your automation back again. Should be easy enough.
  • Update the blueprint, go into your “sensor light automation” and edit the YAML code. I will walk you through the steps, its not hard but you must follow the steps or it will disappear from your automations. So if your not sure or confident maybe do the first option.

1 - This is how your sensor light automation normally looks like. Versions 1.1, 1.2 & 1.3 only. See below.

2 - This is what it looks like after you update from versions 1.1, 1.2 & 1.3 to 1.4. No selection available.

3 - Click on the 3 dots and select “Edit in YAML”

4 - This is how your “motion_trigger” will look like. We need to edit this line only.
4

5 - This is how you will need to edit the YAML. Make sure you put the “-” with a space then the name of your sensor. Code example also below. Then Click Save.
5
code below

    motion_trigger:
      - binary_sensor.your_sensor_here

6 - Click on the 3 dots and “Edit in visual editor”

7 - You should now see your motion sensor with a option to add another one. If you don’t see it go back to step 3 and check your code is correct. If you do then your done.

Enjoy

Blacky :grinning:

Back to FAQ: Click Here

1 Like

Hello Blacky and Community,

First of all thank you for your grait job!

I would like to ask one question which seems to be at first sight an offtopic, but actually is related to this one :slight_smile: May be my ideas could be also implemented here in the future. Or even I can help (but this is not the near future :slight_smile: )

I am new to home assistant and currently evaluating which product to take for my home. So far I do really like HA, but still curious if there is no showstopper. One automation I want to implement is a light control based on motion, light intensity and/or sun position and door contact. The algorithm should be like this:

If I open the door, lights immediately goes on even before motion sensor trigger an event. In this case, light has relative short timeout and if no motion detected in that period of time, the light goes off. This is useful if one just opened the door to check something and left it not fully closed.

Next every motion event will re-schedule long delay or mid-long one. This depends on if the door stays opened or closed. If opened we can run mid-long, but if closed long.

Finally, if door closes (also case open/ close), then light period re-scheduled to the short one again. Means if a person left the room we will turn off the light fast, but if a motion trigger event after the door is closed, then we again re-schedule long period.

Plus some nice to have feature (for bath for example) - flash slightly light with color temperature, color, or intensity every N minutes, so you have time sense.

Now, my question - is it possible to implement this in HA without real hacks? I already saw some “hardcore” with lambdas and plain script, but would like to know if it is possible to make it pretty simple and standard.

With best regards,
Mike

Hi @minko

Look no further with HA you really can do anything you like.

You have got a lot of options with door open, door closed.

Most people just put a motion sensor in the room. They trigger really fast and if the door opens in then it will pick up the doors motion. You then get rid of all your other door open / door closed options. Then just set a time delay long enough to keep the lights on when you are in the room. You can use the by-pass option and then have another automation for your bath. Probably a scene would work here.

You can use the sun elevation if you don’t have a LUX sensor. If you have a LUX sensor put it in a place outside where a light will not affect it then you can use that for all your automations.

That should look after most of it.

So this blueprint will work perfectly!! :+1: :grinning: :facepunch:

Option for your bath. What look nice is to have some strip LED addressable lighting under your vanity and in a niche if possible. Then use WLED to control them. I have a few of these they work. You will have so many options for your bath. He has heaps of information on his site and a YouTube channel. WLED will be auto discovered into HA and is fully integrated.

1 Like

New update 1.5

You have the option to set a start time and an end time. This will only allow it to run between the time periods.

Enjoy

Blacky :grinning:

2 Likes

Thank you for the clarification! In meantime I have already got some insides of HA Power :slight_smile: Will continue to learn in a free time.

Trying to use this with 2 motion sensors in the same room, one a Philips hue the other a Aqara FP01 they don’t seem to want to play nicely together. It would seem the Aqara although showing in the automation isn’t actually registering. Any idea’s

Using the Philips as motion and illuminance and the Aqara as motion, the light comes on when I go into the room which the philips motion pick up but the Aqara isnt keeping the light on even though it still detects me in the room. What I was hoping would happen was they would both detect motion and when the Philips showed no movement with me sitting down the Aqara would keep the light on as it still senses me in the room. Hope that makes sense.

Hi @Fontie, thanks for your question and it does make sense.

I have just tested the blueprint with 2 motion sensors simulating what you are doing and it works perfectly here. So the Blueprint should work as your intent use case.

Lets try and work this out :grinning:. Could you check your Aqara sensor for us as we know your Philips is working fine by doing the following.

Remove your Philips motion sensor from the blueprint and just use your Aqara motion sensor, It should turn the light on and say on if motion keeps being detected.

If it works then see if the light says on with your time delay setting. If it keeps turning OFF then increasing the time delay slowly until the light stays ON. Once you have that working add back your Philips motion sensor.

If it doesn’t work there could be something going on with your Aqara sensor. Check in “Developer Tools” / States and select your Aqara motion sensor. See what state it is reporting. You will need to trigger it and refresh it to see the state change. It should be a ON / OFF state. Then check your Philips motion sensor, again it should be a ON/OFF state.

Let us know how you go :grinning: :+1:

This was resolved through PM. Solution Click Here

Hi,
Great blueprint,bthanks!
As it seems you are actively developing it further, here are some feature requests:

  • option to dim the lights for an interval before Turing them off
  • option to select a different light based on a night entitz
  • accept others sensors than luminance ones for lux (might need to explain this more: aqara motion sensors report lux very infrequently. They mostly sync when they detect motion. This makes measurements wrong, as it registers high lux levels while the lights are still on. If I go out of the room, the lights will turn off. But as the motion sensor didn’t update the lux measurement is still high. If I come back after a short time the lights won’t turn on. I made a template sensor only updating if the lights are currently out. It reflects the real luminance way better than the original one. But the blueprint doesn’t accept this sensor.

Just let me know, what you think!

@capstan1 thanks for your kind words :blush: Glad your liking the blueprint. It is nice to hear feature requests so thank you.

  • Option to dim the lights… I will look into this… if I was to do this it would have the option for turning OFF and turning ON… user can choose. Not promising but has me thinking as I can see a use case for this.

  • Option to select different light base on a night entitz… not fully understanding this. :pensive:

  • Accept other sensors than luminance. Assuming you are using the LUX option and motion. It looks like as you describe that the blueprint is working as it was intended. If the LUX is higher than the set point then it will not run. It seams that the Aqara sensor is not being used as the developers intent.

I would recommend when using a LUX sensor that you have a separate LUX sensor outside that only reads the natural light and is not effected by any artificial light source. You then can use it for any automation, like this blueprint. Maybe don’t use LUX option and use the Sun Elevation option.

The Aqara sensor you have that has motion and LUX will not function correctly with this blueprint if the light that turns ON can influence the LUX sensor. Sensors that have motion and LUX in one do have a use case though. Example: If motion is detected the light comes on and the light brightness is automaticity adjusted depending on the LUX readings. So natural light and artificial light are combined to deliver a required LUX value. This is good for office spaces where artificial light is required to add to natural light to meet a required LUX setting thus being comfortable for workers and also saves on electricity cost. Having it report the LUX values slowly is good as it keeps the lights stable and is not adjusting the brightness up and down fast causing a nuance.

Thanks for your feedback :+1:

Option to select different light base on a night entitz… not fully understanding this. :pensive:

Sorry, wasn’t clear enough. I have a helper “it’s night/we are sleeping” which controls various things. For example it controls Adaptive Lightning night mode and mutes my phone. I’d like to use this helper to determine which light to turn on. At day control normal ceiling light, at night control ambiant light. It’s an edge use case so I really understand if you don’t want to implement it.

Accept other sensors than luminance. Assuming you are using the LUX option and motion. It looks like as you describe that the blueprint is working as it was intended.

I’d just need the option to use a template sensor as alternative to a real lux sensor. I can circumvent my issue with this template sensor perfectly. Sadly, some of my rooms have quite small windows, so an outdoor sensor won’t reflect the situation inside.

Thanks for your answer! Got another question: how does your blueprint handle no motion with various sensors? Only turn off if both detected no motion? Or as soon as one of the does?

Let me ponder on this…

Maybe I develop a different blueprint that will work.

It work of last motion detected then it start the time delay. So if any detector detects motion it will reset. Once all detectors have no motion then the time delay starts.

1 Like

Thanks for this Blueprint.
I am trying to automate my garage lighting, and mounted a momentary switch with an in-wall dimmer. You know, for the WAF factor… a motionsensor controls the lights with help of your blueprint. I read that choosing a scene is under development, but if a device has a level-setting, why not just use that in the blueprint?

Other question, is it possible to use the momentary switch with a double tap as the bypass?
Thanks again!

Hi @ConTS10 happy the hear that the blueprint is working for you.

Spoil alert, I have scenes working in this blueprint and it will be in my next release. Scenes is used by 99.6% of the active installations so it make sense to include it into this blueprint.

I haven’t used this but maybe have look at the Shelly i4. I believe this will allow you to have a switch with 3 actions.

Thanks for your reply!

I did not mean to imply that it does not make sense at all :wink: I just thought it would also make sense to have an entry with a percentage in the blueprint to. Not only on/off, but a level as well.

The Shelly I4 looks nice, but my question about the double tap is about the existing switch with which I can control my lights manually. It is not specific to your blueprint, but a general question. I made a helper switch for being able to use the bypass. I was wondering of I can have some script that detects a double tap of momentary switch on the zigbee dimmer, to toggle that helper switch.

I think it is possible, I will investigate. Thanks for your replies!

All good, I did think about adding a light % as well as it is just quick an easy to set. So yea this may be added in the future… will put it on the list. :+1:

I think it is possible to but haven’t tested it… if you do test it could you let us know how you go.

Thanks