Extend the timeout of a motion detector

I have some Zigbee/MQTT motion detectors that have a maximum timeout of 2 minutes. I want to extend this timeout to e.g. 10 minutes and I want to use the state of these motion detectors not as triggers (it’s easy to add a delay there) but as conditions in other automations.

My first idea was to create boolean helpers and have an automation that sets those to false after a delay, but boolean helpers can’t convey the “unavailable” state and also don’t have device classes, so they can only be on/off and not detected/clear.

Ideally I would create some kind of template sensor that can look into the past (“state is clear if motion hasn’t been detected for 10 minutes”) - is something like that possible?

Use a Template binary sensor with delay_off set to 10 minutes.

1 Like

Uh, wait, how do I set these options, now that template sensors are created in the UI?

Do it in YAML… only the most basic functions are available in the Template Helpers, everything else is still YAML only.

Ah, I thought YAML was deprecated. I regularly get these “repairs” where it tells me to remove certain YAML definitions because they have been migrated.