Automating Lights and Fans with Microswitches: Seeking Solutions

Hi everyone, I’m trying to set up a smart home feature that automates both my bathroom lights and fan using Aeon Labs microswitches. The goal is to have the fan turn on automatically when I press the light switch for more than three seconds. If that’s not feasible, I’m open to other ideas, like having the fan activate if the light is toggled within five seconds.

I’ve configured the microswitches as press-button switches, but I’m not quite sure how to program this specific behavior. I’ve heard that it might involve some scene settings or maybe a rule engine within my smart home system.

Has anyone successfully implemented something similar? I’m curious to know if this can be done and what steps I need to take. Any advice or tips would be greatly appreciated! Let’s see if we can make this automation work smoothly. :blush: