What’s the brand and model of the switch?
Some have multi tap support built into the firmware, which makes everything much easier.
For example, there is a community-created Edge Driver which supports doubletap for many GE/Jasco zwave models.