Detect Light Switch Flash On-Off In Automation

Is there any way in an automation to detect when I quickly turn a light switch on then off within, say 5 seconds? I would like to do something different in that case, such as turn the light yellow instead of white. It has both a wall switch and a color changing bulb.

Thanks

Is it a normal light switch or a smart light switch?

Smart light switch

Please reply to me next time instead of replying to the topic. This way I’ll receive a message that you replied to me

Generally it’s not a good idea to combine smart lights and smart switches as itbrequires quite some logic to keep everything synced and working as expected.

What kind of smart switch is this? What is your end goal with this automation?