I’m fine if yall want to “teach this man to fish” rather than “give him a fish.” I’ve looked around for a couple of hours and can’t find a concise solution to my question. I have no doubt that the majority here can answer this after you get done rolling your eyes at the newbie! Feel free just to post a link or suggest a search term that I can use to find what I’m looking for.
I have a parking laser assist setup on a smart plug. These lasers are particularly prone to going dim if they are left on a lot. I have a driveway motion sensor at the end of my mailbox, and my garage door opener has an obstruction detection sensor, both integrated into HA. Currently the trigger is the obstruction sensor, and the condition is the driveway sensor is detecting motion. This won’t work obviously, because both sensors would have to be detecting simultaneously for the automation to run.
I’d like to add a condition that the driveway motion sensor must have detected movement in the last 30 seconds for the automation to run. That way, a car pulling in gives a 30 second window where the obstruction sensor can trigger the automation.
I setup the automation in Visual Editor then copy/pasted the YAML it generated below. I don’t even know how to copy paste with the YAML line numbers. I’m kind of shaking my head at myself.
EDIT: well when I tried to post the thread, the forum even told me I had no idea what I was doing and told me how to do it. So wahlah!
alias: Parking Sensor ON
description: ""
trigger:
- type: problem
platform: device
device_id: 89023c15f1853a5a76823a2b10533f3f
entity_id: f8757e78b491ca75440673cf2c0f564c
domain: binary_sensor
condition:
- type: is_motion
condition: device
device_id: 9566d75bd1a5c03ce1f7667f187bc0c4
entity_id: 2968cf73b8b10e14be0e3f8856e383ed
domain: binary_sensor
action:
- type: turn_on
device_id: b264bcbff5891d9f52d32d4a087a9a85
entity_id: 63b3b11200be485d611f8108d5410ed6
domain: switch
mode: single