I have two motion sensors with different behavior (i.e. time to turn off is different) one at the bottom of my stairs one at the top that I want to use to control a light on the stairs.
How would I code this with in HA yaml?
I’m fairly certain I want this pseudo code but don’t know how to put that into an HA yaml:
if (sensor_a or sensor_b) to 'on' then
light on
if (sensor_a and sensor_b) to 'off' then
wait 2 minutes
light off
fi
fi