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

Hi Momo

  1. So the easy way to achieve this is to use a scene and set the brightness there. I will look more into this.
  2. I will PM you.
  3. The automation needs to restart to reset the time delay. One way you could achieve this is if you have multiple triggers and they stay ON for a long time. Like in your home office and your computers power binary sensor and put it in a group. That way it will sit there waiting for it to go into a OFF state. The other thing I can think of is if your motion sensor as a inbuilt delay and adjust that so it stays ON for a longer time. I think you were looking into that.

Hello @Blacky thanks for your effort on this Blueprint, Iā€™m very interested on use the ā€œSunā€ condition, but Iā€™m not quite sure if I can achieve that using the sun elevation, so maybe you can enlighten me.

The thing is, that I want to replace HomeKit automations, and on mostly of them I have a time before sunset an a time after sunrise for trigger, like this:

That is something that I can manage with the sun elevation degrees ?

Thanks in advance !!

Hi @garanda21

Have a read of our FAQ in regards to sun. Below is the link. Once you have done that let us know what you think.

Click Here

Sun elevation and time after sunset / before sunrise can get quite a different result specially if you are way north on south in the planet.
If you are above the polar circle the sunset not even happens for some days during the year and closer to those days you still having light over all night long, as the angle is not gonna be too low regardless how many hours after the sunset.
In the other hands, during winter, you cannot have a sunrise for days, but in some days could be quite clear, as the Sun gets quite close to the horizon.
The closer you are to those extremes the easier to see the difference, but that is valid everywhere (to certain level).

1 Like

Also remember this time is not a trigger but a condition for the trigger. In saying that it will trigger on time if the trigger sensor is in the ON state and it passes through the start time, sun elevation or LUX value. It will then turn the lights ON.

1 Like
  1. Brightness is done something like here Motion-activated Light-brightness. Scenes are really not the best way to do it.

  2. thanks

  3. I think a condition can be introduced right before the action ?! If state is on then skip, else turn on or something along those lines.

  1. I quickly did the brightness before but when testing it, if a light didnā€™t have the ability to adjust the brightness then the light didnā€™t turn ON. If all the light can be adjusted to a brightness then it worked and it set them all to the same brightness.

  2. no problem

  3. If you have a condition just before the action then it will never turn the light OFF. Maybe give us a example of the condition you are thinking of.

It is not a special condition, just a check if the light is on or off. It should not impact the OFF function or anything else. So just before sending the off comand, check the state of the light. If itā€™s off already then do nothing, if itā€™s on call service turn_off.

Why do you think it will never turn off? I could be missing something obvious :innocent:

Thanks for your response and advices, totally understood. Iā€™m going to take a look into it.

1 Like

Scenes are used by 99.6% of the active installations. With scenes you can change the brightness, colour and effect of each individual light. It is maintained by HA, so it is a really good way of doing it. If you would like to change the brightness according to the time of day / sun position then Adaptive Lightning is really not that complicated. I have also explained the simple slider for brightness, hope this make sense and is why scenes just work and it is simple.

If we check if the light is ON before we turn it OFF knowing that we just turned it ON is not going to reduce traffic it will increase traffic and code. If we put a condition in before we turn it ON say ā€œif OFF then turn ONā€ to reduce traffic then the first motion detected will turn the light ON but because the automation is a ā€œrestartā€ then if motion is detected again it should stop and not turn the light OFF.

The ā€œON / OFF every time it is triggeredā€ looks to be your motion sensor not the automation. This is why I suggested a group or your inbuilt motion sensor delay. When a trigger is received it will only send a ON, wait until motion is not detected then the time delay has to pass and then turn light OFF. If you stop it with a condition then it will never send a OFF and the light will stay ON.

Hope this helps and makes sense.

Thank you for the patience and very detailed info :smiley: Things are clearer now. But i still do not like scenes :rofl:

Hi Blacky,

great Blueprint you created - thx for sharing.
As i found your blueprint i thought all my wishes comes true ā€¦but :wink:

There is a little issue in the end for me.
My problem is, that the motion sensor is the same as the brightness sensor.
So after the first trigger ( Motion on, brightness under 20 ) light goes on.
I move in front of the motion sensor and he should retrigger the automation as long as iĀ“m in the room.
But that do not happen , because the condition ā€œbrightness under 20ā€ is no more true because the light is on :frowning: . So the automation waits definded time (120s) and the light switch off -
Is there a way to check the automation is trigger the second time and so the condition ā€œbrightness under 20ā€ will switch off or a simlilar logic ??

I hope you understand my issue ā€¦
Greetings,
Andreas.

I have many motion sensors with integrated LUX, so i know what you mean :smiley: The only solution i found for this was to tweak the LUX value, so those 20 in your case to a number which is higher then when the light is on.

I thought on something like check the retrigger index (starting with 0, if the automtions starts the first time after switch off) in the conditions togther with the brightness check.
ā†’ condition sample: "ā€¦ if the brightness is under 20 or the retrigger counter is not 0 ā€¦ "
DonĀ“t know how to implement this in detail, but i will go reading and check if this could be a way to solve thisā€¦

Hi @EsserA

Is it possible to use the sun condition rather than the LUX?

This can be done just trying to understand the use case and if other people would like it too. This way if I add it to the blueprint we get it right.

1 Like

Hi Blacky
This is amazing!! It worked to solve my biggest marriage conflict so thank you for that :laughing: . I didnā€™t create the helper switch and it just works fine without but bypass only works when I turn on the light manually on home assistant but it doesnā€™t work when I use the physical switch thats on my wall. Is there anyway around it?
Iā€™m thinking it may work if I put a few seconds delay: when the lights turn off then motion is detected again wait a few seconds before turning on the light again and before the motion sensor triggers the light I will use the physical switch to turn the light on, I have no clue of why I think it may work.

Cheers :beer:

1 Like

love it :+1:

If you have a physical by-pass it must have a ā€œONā€ & a ā€œOFFā€ state (not ON/OFF). It should work perfectly if you manually turn a light ON or OFF from either HA or the physical switch on the wall.

So if the by-pass is in the ā€œONā€ state you should be able to turn the light/s ON & OFF manually with a physical switch on the wall or in HA and they should stay ON or OFF depending on what you have selected (No delay time OFF). When you turn the by-pass OFF you will then have to manually turn OFF the lights unless all the options are true, and the trigger is triggeredā€¦ it will then start the automation and turn OFF the lights.

I tested it again here and it worked. If you can check yours again and let me know it would be appreciated. :slightly_smiling_face:

Delays and that kind of stuff can break the blueprint. I would like the blueprint to just work an you shouldnā€™t have to do anything. Plug and play. If you would be so kind and check again and let us know.

New update 2.0

Added a option for the Ambient Light Sensor.

In some cases when your lights turn ON your ambient light sensor is affected increasing its LUX value. This can cause the lights to go OFF prematurely. You now have the option to set the ā€œAmbient Light Sensor - Site Conditionsā€.

  • YES - My Ambient Light Sensor is affected by the Lights
  • NO - My Ambient Light Sensor is not affected by the Lights

Enjoy

Blacky :grinning:

1 Like

@Momo @EsserA

Please upgrade to V2.0 and select the ā€œYESā€ in ā€œAmbient Light Sensor - Site Conditionsā€. This should resolve your automations.

Enjoy

Blacky :grinning:

I was drunk when i was doing thisā€‹:joy::joy:. Now i have to drink again to get into the modeā€‹:rofl:. My physical switch is a toggle if thats the correct way to name it? I can easily remove the spring behind the button then i have a on and off but then i will lose the possibility of dimming which is used very frequently. But how about using a cheap smart switch behind a wall switch ( a different wall switch) and then make the new smart switch as a trigger to the lights without dimming option and also use it as the by pass switch. Or does it have to be physically connected to the lights?
In other words the new smart switch will be used in an automation to trigger the lights on and offšŸ˜Š. I hope this makes sense and not just a hungover brainšŸ˜µā€šŸ’«šŸ˜µā€šŸ’«