šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

@Anaconda

Recap: This sensor is designed for the below request

How the sensor works.

  1. If you are in the room and the total room is detected you can push a button to turn it ON. If the room is not detected (clear) then when you push the button it will turn it OFF if ON or do nothing as it is OFF already. It was not realy designed to use it to turn it OFFā€¦ it just works this way. It should be used for the ON only and you would label it "All Light ON * " with and ā€œ*ā€ as it has a condition that the total room must be in detected (ON) state for it to go ON. The reason why I didnā€™t put 10 min there and only 30 seconds as I thought once you see how it works you will only need seconds but I gave you the code to change it to minutes if you would like, as it is your HA set up. This 30 seconds is there if you walk out of the room say to answer the front door and your total room goes clear (OFF) then you will have 30 seconds to reactivate it before it will turn OFF (clear) and your automations to work in zones again. You will need to adjust or remove this according to your requirement.

  2. When the total room goes to clear (OFF) then it will turn OFF once the 30 seconds have passed. This is where I think you could be getting tricked when testing as if you turn OFF your lights manually look at your total room detection and see it clear (OFF) and it has not been more than 30 seconds and you walk back in nothing will happen as the template sensor is still ON (detected).

    Conclusion: So if you press the button it will turn all zones lights ON if total room presences is detected and if no presences is detected for 30 sec it will turn OFF then the automation it will start the time delay and turn your lights OFF. So when no presences is detected it will be 30 sec + your time delay = lights OFF.

Now it look like you would like to be able to cancel the template binary sensor when the total room sensor is ON, well you canā€™t once you press the button. It works like a normal motion sensor now but you get to decide when you would like all your light ON. Then you just have to run the automation. Pushing the button when the total room sensor is clear (OFF) ā€¦ well it will do that automaticity anyway.

I took the time to test it here so I now know it works. Not sure why you have to quit the room. Your total room sensor should go OFF when all your zones are OFF. I donā€™t know that as I donā€™t have one but It would be very strange if it didnā€™t work that way.

Blacky :smiley:

1 Like

@valiksheva

Yes

What will happenā€¦ if you turn the light ON manually the light will come on and stay ON. If motion is detected once the light is ON the automation will take over. You canā€™t have a trigger on the Light to turn off once ON and have this automation as they will fight each other.

You can use the by-pass with a trick. Create 2 by-pass switches.

  1. Use by-pass ā€œTurn lights ONā€ and use the auto off delay.
  2. Use by-pass ā€œKeep the lights current stateā€ and dont use the auto off delay for this one.

Trick: Use ā€œTurn lights ONā€ to turn the lights on and the auto off will work and if motion is detected in that time the lights will stay on. If you use the ā€œTurn lights ONā€ to turn the lights and then by-pass ā€œKeep the lights current stateā€ the lights will stay ON until you turn this OFF manually the ā€œKeep the lights current stateā€ by-pass.

@harryfine

Hi Harry

The ambient high value is a set point to crate a dead zone (between low and High). So for you the light is allowed to be turned on when the ambient light goes below 30. Once the light is ON it can stay ON until the ambient light goes above 80. It helps you on cloudy days so your lights dont go ON and OFF.

The way to set it when your light level is 29.99 lux and your light goes ON your brightness will increase if your sensor is effected by the light. So now your level may go to say 70 lux when the light is ON. You then can decide what lux you would like the lights to go OFF at. You may choose 100 lux. So as the cloud cover decrease and the sun comes out again the light will turn OFF at 100 lux and or if no motion is detected. It stops this bounce of light ON, light OFF, light ON, light OFF, etc.

Hope this make sense

Blacky :smiley:

Got it. Like a dwell setting on a thermostat. Thanks Blacky.

Yep, exactly right.

  1. Can I switch a light off which wasnā€™t switched on/off by Sensor Light?
  2. Can I start another automation when time_delay runs in timeout?

see below

1 = Yes
2 = I am sure there would be a way with some type of template switch sensor and then used it in Lights - Switches - Scenes.

Can you please provide an example for 1 (and perhaps 2)?

For 1 = You just manually turn it OFF or you link it to another template switch so when the switch turns off you make this light turn OFF.

For 2 = Same theory as 1 but you turn it ON.

I would recommend first making a template switch that does nothing and use that switch rather that a real active light or switch.

You can find information on templates here

Hi Blacky, I am using your blueprint and I wanted to ask if it is possible to make the motion sensor detect only in a specific period, for example from 12:00 to 17:00. Thanks!

@DmytroD

Hi Dmytro, welcome to the community :wave:

Yep, see below. This time is global for normal lights and night lights.

1 Like

Great thanks!

@Blacky Am I right in thinking that to get the night mode to work I need to have a sensor that is ON for that time?

This is for an area covered by a Hue Motion Sensor so I have activity and illuminance. Out of the box the daytime works a treat, triggered by light level and activity. For night mode I want same triggering just a lower light level on the light.

We had an old plug in night light that was triggered by motion, but after 30 years of stalwart work, itā€™s given up the ghost and I thought a few minutes work and Iā€™d have a replacement, but it didnā€™t work last night, so Iā€™ve missed somethingā€¦

Chris

Hi @ChrisThomas

In night lights we have 3 conditions we can choose from. You can use one of them or all of them it is up to you. You can have a Entity State, time or sun. I use time in some and state with my phone in others.

  1. Next to state there is a link that will explain it.
  2. Time is between the time but if you use time in normal lights then that time has to include night light time. A link is there for more information in normal light time.
  3. Sun is below your setting. More information is in the FAQ for this.

Hope this helps

Blacky :smiley:

@Blacky It all helps! That what I appear to have set, Iā€™ll try again tonight.

So my daytime and nighttime are contiguous, should I leave a small gap between the times? 08:00:00 to 23:00:00 and 23:00:00 to 08:00:00.

Thank you so much for your amazing work with this blueprint!

One question though, Would it be possible to add a (optional) second light sensor?
I have a light sensor in the room and one outside, and I would like to trigger this automation when itā€™s dark outside OR when the curtains inside are closed which I can see by the value of the sensor inside.

@ChrisThomas

No

Because you would like the automation to run 24 / 7 then disable the normal lights time and only use the night light time from 23:00 to 8:00 as shown below.


Blacky :smiley:

Your welcome.

Yep see FAQ

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

Blacky :smiley:

@blacky Doh!

Testingā€¦ testingā€¦

Thanks, but adding a group sensor and then using the combined or minimal value for example wonā€™t work for me.
I want the light the turn on when ā€˜Motion is detected AND (inside sensor <= 3 OR outside sensor <= 30)ā€™ for example. That is not possible with a combined sensor I think.