So the easy way to achieve this is to use a scene and set the brightness there. I will look more into this.
I will PM you.
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:
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).
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.
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.
no problem
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
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.
great Blueprint you created - thx for sharing.
As i found your blueprint i thought all my wishes comes true ā¦but
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 . 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 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 Blacky
This is amazing!! It worked to solve my biggest marriage conflict so thank you for that . 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.
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.
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.
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
I was drunk when i was doing thisā: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šµāš«šµāš«