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

It get’s little bit tricky with all the options but I do love that :honeybee: Bee In The Hive Sensor :honeybee:. It is pretty cool hay.

Not sue what you are referring to here.

Make 2 sensors or are you referring to having double doors… if so you can group your door sensors or you will have to change the template so it will work… easy way is to group them and use the group as the door sensor.

Normally you just set this up once. You can have any value you like just type it in and click save. So if you would like 658 or 13 just type it in.

This is where you would use a scrip and put it into “Lights - Switches - Scenes - Scripts” or “Night Light”. You would create a script an use an If-Then-Else. So it would be IF = Light is OFF (selecting your lights) Then = Turn Light OFF (Selecting your lights) Else = Turn Lights ON (selecting your lights). A detailed guide on this process (similar) can be found Here.

Blacky :smiley:

Well, I’m past the bedroom lamp be bright from 6 until 10 PM on motion sensor and dim with night lights in the middle of the night.

2nd project working for lights On at least, my first schedule helper. Off is the minutes delay so that should work in the morning.

Now to play with sunrise and set for the above, so that I don’t have to change times in the helper schedule.

Rest assured, I’ll be visiting the donate button and checking into your other blueprints.:wink::+1:


Nice to know your getting the hang of the blueprint and HA :+1:

Blacky :smiley:

Thanks for the replay!
Is it so complcated to just ad a toggle button to say only on or only off action per entity? that saves scripting :slight_smile:
With the humidity sensor I meant it could be used as a presence indicator if humidity goes up fast → some under the shower.

Im struggling with the script for just turn the light out if nobody is in the room.
When is the scipt called? Sensor detects motion and no-motion? Because then I need to determine in the script if this is an on or off action.
So if light is off or on and motion is detected, do nothing.
If no-motion is detected and light is on, switch light off. How do I recognize in the script if this is a motion or no-motion action.
If I need to do this handling and logic all in the script, in don’t need your blueprint anymore. So having a button to configure this would be super cool :slight_smile:

And of cause the possibility to easily add a door sensor for the Wasp in a box scenario.


Hi Sebastian

You realy need to look at my :shower: Bathroom Humidity Exhaust Fan blueprint. This blueprint works with it and it works perfectly + it will control your fan for you.

Just a quick question, why are you using a script. You dont need to use a script just enter in your lights or switches. It is realy easy and you may be trying something that is not required.

Have a look at groups in the FAQ. Group your door sensors. Then follow the guide on the be in the hive but use your group as the door sensor.

Blacky :smiley:

New update 6.2

Your lighting experience, your way – take control and customize it to perfection! :bulb::sparkles:

Bugs Fixes :bug:

  • Fixed bugs when using scenes & scripts and sun.
  • Fixed bugs when using scenes & scripts and ambient.
  • Fixed bugs when using scenes & scripts and time.
  • Some error logs.

Maintenance :toolbox:

  • Cleaned up some conditions.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:


Blacky :grinning:

1 Like

I have a question to the lux-based options. My motion sensor (IKEA Vallhorn) is in a guest bathroom. There the lux value only rises up to 10 lux, even on a sunny day (see screenshot). Why is a value of like 2lx not possible for the e.g. ambient light sensing high/low value?


Just simply type the number in and click save. You can set 1.9 if you like totally up to you.

Blacky :smiley:

1 Like

ok if this works I’m happy :grin: Thanks for the quick reply :slight_smile:

Hey Blacky, I think I confused myself.
I want one light not going on when I enter the room at any time. But I want to switch it off when I leave the room.

Where do I configure that it is only turned off, not on.

In the answer to my first post you suggested to use a script…?

I have the same set-up. I want to only turn on two lights when i enter the room. But if i happen to turn on more lights while sitting in the room i want to turn off all lights in the room when I leave.

I managed to do this with two scripts.

Could you share your scripts pls?

Great work as always. Just wondering if is possible to implement making some of the settings collapsable? For example, I’m not using Dynamic lighting in the blueprint, so I can simple collapse all settings related to it, and expand if needed, it should be collapsed by default.

The blueprint is quite powerful and has vast amount of configurations on a single page. which can become overwhelming for some. Hope you understand, thanks.

1 Like


Yep a script… example below. A guide on this process can be found Here.

If-Then-Else script into ‘Lights - Switches - Scenes - Scripts’ No toggle helper in ‘Scenes & Scripts - Toggle Helper’




Then create a scene with all light OFF and enter into ‘Scenes - Scripts To Turn OFF’

Blacky :smiley:

How can I add an offset for Sunset so lights come on 1 hour before sunset, and 1 hour after Sunrise? I tried tweaking the Sun Elevation either way, but it doesn’t do anything for me for some reason.

You can vote here Collapsible Selector Groups - #2 by Blacky

Blacky :smiley:

1 Like


Firstly welcome to the community :wave:

Please see the FAQ in this.

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

Blacky :smiley:

Hi @Blacky first of all your blueprint looks amazing! Thanks you for sharing that with the community. As I am playing around with it, I came to the following issue:

My light gets turned on whenever there is motion and the illuminance is below the lux level I have set. One minute after the last detection of motion it turns off again as it should. However, turning on the light changes the illuminance measured by the sensor, which means the lights do not turn on again when I re-enter the room, because the illuminance is now too high for the automation to trigger. I tried to figure out if I could solve this by using the ambient sensor options your blueprint provides. Unfortunately, I was not successful despite reading the FAQ.

What I guess is missing is a cutoff value for the illuminance in the room, so the automation only runs when the illuminance is below that cutoff value, as well as an illuminance value that is not provided by the motion sensor itself, because then the illuminance would be affected by the light when the light is on. The illuminance value should instead be provided by a number helper which is basically a copy of what the motion sensor’s illuminance would be BUT only changes lux when the light is off (got the idea from here). This way you only get “real” values for the illuminance in the room without any interference when the light is turned on.

I hope I explained this in a way one can understand and am looking forward to your answer. :slight_smile:


Is your LUX sensor slow to react?

see ‘Ambient Light - Low Lux Value’

Select ‘YES - My Ambient Light Sensor is affected by the Lights’

If you like then to can create a template helper, then use that for your LUX sensor but when the light is OFF you will need to check LUX at quick intervals as you may close your blinds and the room gets dark. You could get a LUX sensor that reads fast and your problem is solved. See we need data to make things work if you would like it to respond quickly. If you had a LUX sensor that updates fast then everything works. The data is only stored for 10 days so you dont build a big data file thanks to the work from the HA Team.

I think all you need to do is tick the ‘YES - My Ambient Light Sensor is affected by the Lights’.

Blacky :smiley:

1 Like

Hi @Blacky you were of course absolutely right. My bad I got some settings wrong. Thanks for the explanation and your blueprint. This is absolutely amazing!

One final questions: Is there an option to completely block the automation from running at night? As far as I have seen, the night option only makes it possible to have different settings for the lights whenever the night condition is met, but it always means the lights will be ON in some way.

In my old automation, I used a helper that is activated whenever I say Good Night to Siri, resulting in the light automation being blocked. When I say Good Morning, the helper changed its state and the light automation would be active again.


1 Like