Timer Automation with motion sensor

Hi,

I have an aqara motion sensor und a light and want to make an automation…

when motion is dedected - light goes on for 5min and after 5 min should go off

Is that only possible in yaml script or what is the easiest way?

And the aqara sensor ckeck motion or not every few minutes. I want to set it every few seconds (i know battery life)

You can eaisily create that automation in home assistant automation section. Create one automation for turning light on and other for turning it off. If your pir senor has a illuminance sensor put that also in. So it will trigger light only when lux is bellow some value.
Battery on my aquara pirs are 100% and they are detecting a motion all day long for more than 6 months.

Works now!..you must exactly set the same duration time in the automation and in the helper

When my aqara motion sensor dedects a motion the status is at detected for 1,5 minutes and after 1,5 minutes the status goes to normal.
So when for example you move after one minute the timer dont reset to 5minutes because the status of the pir is already on detected (for 1,5 min)
How to change this time?

I never had that issue and I dont think that you can actually change detection time. Maybe something is moving in front of sensor. When sensor detect motion it should go off in 5 to max 10 sec.
I dont know why you have such a long detection time, but you can try few things. Move sensor to another room and see if anything changes. You can also remove senosr from zigee2mqtt and pair it again.

That depends on how you run/have integrated Zigbee in Home Assistant. In my case I use Zigbee2MQTT (v1.25). After selecting the device in Zigbee2MQTT:

The above is specifically for the forementioned Aqara Motion Sensor, that we both have.

For other devices, it might look like this (depending on how you’ve integrated Zigbee in Home Assistant):

Hope this helps.

I have integrated the aqara with conbee2 usb dongle (deconz)

…but i have no entities or any other possibilities to change the time?!

Maybe an idea: depending on where you use this, you might have a second automation to switch the light off when there is no motion anymore, and after some time has passed.

I had a problem that in some cases this initial way of just having a timer that starts when motion is detected, and I returned to that room, I could end up in the dark.
It’s a different way of handling lights with motion sensors, a preference and also case specific.

or use trigger id’s to do it in one automation…

Help with Complex Motion Sensor Automation - Configuration - Home Assistant Community (home-assistant.io)

This is really interesting. I will check this when I have a time.

This is the key —>

Occupancy timeout! Default = 1,5min and i also want this time change du 10sec but there are no parameters with conbee integration

I have tried to install zigbee2mqtt but there is allways the issue: 502 bad gateway

Can anybody help??



if I would have known how difficult it is to set a time period to turn off the light - I would have never purchased Aquara
Changed to Philips…