You can watch the forums here and wait for them to come back into stock. It looks like they show back up every couple months but sell out very quickly. I missed them several times. I have waited almost 6 months and someone else was waiting for a year until they finally got a couple last time around. You can also ask Home Depot to email you when they come into stock but that wasn’t all that reliable for me.
If you don’t want to wait, then you can order the repair parts from KOF. See this thread: Hampton Bay Zigbee Fan controller
Those are the only 2 options if you are looking to automate your fan in this way. Unless your fan is very close to your hub, you will probably also need to make sure that you have a hardwired zigbee device close by to act as a repeater too.