Turn light on and off based on detected motion with sun condition

Hola, puedes poner los sensores pir en una zona baja que no “vean” encima de la cama. Yo tengo dos uno en el techo y otro enfrente en la cama en el suelo. Uso los de Xiaomi y la batería le dura más de dos años.

Direcciona los sensores de manera que no "vean " a ras de suelo. O encima de un mueble.

Thanks for this, works a treat but I need to add ‘switch’ as well as bulb. Can you help please

Easiest way would be to use Switches as X from 2022.04

did you get this working this is what I have setup on Hubitat evo but as I’m moving over to HA this is a lot harder to do

Is this why I can never get the offset to work right? It’s been driving me nuts.
How do we fix the blueprint itself then because I use this for multiple automations and would rather correct the blueprint than have to tweak the values.

Hi. I am using this blueprint along with adaptive lights blueprint as well.

I want to set a condition, if sleep mode is on, to turn on specific lights. E.g. I have 1 main lamp in the kitchen and 2 LED lamps for ambient light. When is sleep mode and I woke up for a glass of water, I want minimum light, only the LED lamps.

I was just wondering if anyone else has already done that. I have the skills to achieve it myself (and share it with the community), but if it is already in someone’s system, why reinvent the wheel :sweat_smile:

1 Like

About the offset, is that an offset before sunset and before sunrise? In my case I’d like the automation active beginning 30 minutes before sunset and to stop being active 30 minutes after sunrise so it seems that one number should be positive and the other negative or am I overthinking this?

1 Like

Weird thing is, i can’t select lamp as entity,only showing 2 and i have 22 lamps that i can control with HA

I’m using this automation twice, I have a 2 exterior motion sensors and each one turns on it’s own set of lights. One light is used in both automations.

I’m seeing lights staying on and not always turning off after motion. Usually in the middle of the night when the critters cause multiple PIR triggers.

How do I debug this to figure out what is happening? Or any tips to prevent this?

Are your lights as entity light? or switch?

Has anyone for a way of using this well with multiple motion sensors.

ie I’m using the motion triggers from my cameras. I’d love the lights to stay as long as their’s motion on any of the cameras. Currently whichever camera first sensed motion is the one that is rechecked after the delay meaning the lights go off even if there’s motion in range of one of the other cameras (but not the original trigger).

Great blueprint, hoping I can modify it slightly to work for the above.

@Marcos_Felipe is it possible to use a MQTT topic/payload instead of a motion sensor?

What would be the best way to add a condition to this where it wouldn’t trigger this automation if the light was already on?

IE If I am in the room and have the light(s) turned on already it wouldn’t change it to the scene I have it set to.

@Marcos_Felipe thanks for your work,
It’s possible to add the option to make flash the light?

thanks

Hi.

Would be great to have the option to turn ON lights at sunrise and OFF at sunset. Is this possible?

Tried setting up the bathroom lights using the ld2410 but got problems since I have three cats and loud Aquara wall switches.

First, I set up an automation to turn on the bathroom light when a presence was detected. The switches are loud and the ld2410 is very sensitive. So when the cat enters the bath, the wall switch turns on and it’s loud (especially at night). So I changed the trigger to ld2410 motion detection. This helps with cats, but I noticed a long delay between entering the bath and turning on the light.
Now I added a door sensor and want to use ld2410 presense detection only when door was opened or closed not more than 5 seconds ago.

Is there any way to setup to such HA automation: Switch light on when presense detected (as a trigger) and door was opened or closed not more than 3-5 seconds ago.

Did you manage to get this working? I guess there is no harm in setting the light to ON again… But I don’t want it to switch off once the motion event has ended if the light was originally switched on…

Since the HA November update I notice serious delays activation of the light and when triggered again after few minutes, the light doesn’t turn on.

Any idea what has changed?

Any success here, I can’t get that solved as well…