There are numerous other ways to solve this problem, many of which offer more functionality such as separate control of the fan and lights.
I had a similar situation and ended up getting the Hampton Bay/Wink zigbee fan controller which installs inside the fan canopy, as well as an in wall RF remote to install where the wall switch had been previously. Info on that can be found here:https://community.smartthings.com/t/beta-v0515-hampton-bay-zigbee-ceiling-fan-light-controller/85084
This enables me to control the fan and light separately (including dimming the lights) both from the wall and from the SmartThings app and with automations. If I were to do it over again based on currently available devices and the current state of the SmartThings apps I would do it differently, but I also have more options than you because I have a neutral in the switch box.
One option would be to install a dual relay rated for fan load in the fan canopy, and a smart switch in the wall. Some switches don’t require a neutral, and also have a feature that allows the relay in the switch to be bypassed. With the switch relay bypassed, the relays in the canopy will always have power and you can set up rules to allow the switch to control them, such as single tap on top turns the lights on, single tap on bottom turns the lights off, double tap on top turns the fan on, and double tap on bottom turns the fan off. This would give you separate control of the fan and lights, but wouldn’t allow dimming of the lights.