Hi I currently have two motion sensors in my ensuite, one near the doorway and one in the shower. Which turn the lights on and the extra fan.
I want to automate a state that is if the shower detects motion 3 times in 5 minutes than my fan relay stays on for 20 minutes. Otherwise it goes off after 5 minutes.
What’s the best way to do this in a automation?