If you have a model that supports double tap, then you need to find a DTH (device type handler) for that model which will turn the double tap into a button number. Then when you use the official smart lights feature or most of the other automations you will select the switch as a “button controller“ and choose the “button“ that represents the double tap.
That all sounds more complicated than it is in practice, it’s pretty natural to use.
For example, suppose I had a switch that allowed for single tap on, single tap off, double tap on, and double tap off.
The device type handler would treat it like a device with four buttons. Maybe Button one for single tap on, button two for double tap on, button three for single tap off, and button four for double tap off.
Then I would just choose which “button“ to use as a trigger in an automation.
Again, all of this only works if the physical device supports double tap and there is a DTH which converts the double tap to a button number.
So the first question to be asked is what’s the exact model number of the device you want to use?