Why on earth would you do that? An IR blaster costs $25 and will connect to Homebirdge so you have it in Apple Home (or Android whatever). I made 2 dehumidifiers and 2 floor fans “smart” by buying the cheapest possible smart plugs on Amazon, an Amazon branded smart plug cost me $1 during a sale.
BroadLink RM4 Mini IR Universal Remote Control, Smart Home Automation Wi-Fi Infrared Blaster https://a.co/d/8GnOVRU