I want to automate closing my garage door in case someone forgot to do so. The following conditions have to be met for the garage door to be Actioned to close:
- The garage door must be in an open state
- The obstruction sensor must have been clear for 5 minutes. This ensures no one is actively moving in and out of the garage through the garage door (meaning the garage door being open is still being utilized).
As I read up on Triggers and Actions, it seems like a timer that tracks (1) how long the garage door has been open (2) how long the obstruction sensor has been clear, cannot be tracked independently. To elaborate, once the automation is triggered due to the garage door being open for 5 minutes, the timer of the obstruction sensor cannot be tracked in the same automation using a naive implementation.
I even tried setting the trigger to the obstruction sensor, however I only see a 'changed state' trigger for the obstruction sensor, rather than a 'has been closed for X minutes'' trigger.
Do I need to consider templates for this, or helpers to track time, or both?