Trigger Automation Based on Light Switch Combination

Hi All - Would it be possible to trigger an automation based on a series of light states? For example: I’d like to kick off an automation if I toggle my light on and off quickly twice: On, Off / On, Off

Thanks.