You should checkout the Broadlink IR Climate Component. Broadlink IR Climate Component
As an alternative from that I manually setup the commands using my Logitech Harmony Remote, same would work for if you adjust the code. AC Split System integration via Harmony Remote