I thought I would share a concept I’m working thru in regards to controlling my Hampton Bay fans via HomeKit/Homebridge. In my setup I already have a lot of Tasmota Devices so have a pretty robust MQTT Setup, and am using the homebridge-tasmota plugin which uses Home Assistant MQTT Discovery messages to create devices in HomeKit. And I also use node-red for a little bit of everything. And for a OpenMQTTGateway Device, I’m using an ESP32 based device with a CC1101 RF Transceiver connected.
My concept is to use Home Assistant MQTT Discovery message to create the FAN/Light accessory in HomeKit. So far this is working pretty good with my homebridge setup, but am thinking it should also work with a real Home Assistant setup ( with changes for your setup )
To create the FAN controller I’m injecting this Mqtt message via a node-red inject node ( Code 1000 )
{
    "avty_t": "~LWT",
    "name": "Test Fan 1",
    "uniq_id": "3C71BF9E0770_F1_1",
    "payload_high_speed": "{\"value\": 1119,\"protocol\": 6,\"length\": 12,\"delay\": 437,\"mhz\": 303.732}",
    "payload_medium_speed": "{\"value\": 1135,\"protocol\": 6,\"length\": 12,\"delay\": 437,\"mhz\": 303.732}",
    "payload_low_speed": "{\"value\": 1143,\"protocol\": 6,\"length\": 12,\"delay\": 437,\"mhz\": 303.732}",
    "pl_off": "{\"value\": 1149,\"protocol\": 6,\"length\": 12,\"delay\": 437,\"mhz\": 303.732}",
    "pl_avail": "online",
    "pl_not_avail": "offline",
    "speeds": [
        "off",
        "low",
        "medium",
        "high"
    ],
    "cmd_t": "~commands/MQTTto433",
    "device": {
        "name": "cc1101-9e0770",
        "model": "[\"BME280\",\"BH1750\",\"RF\",\"Pilight\",\"rtl_433\"]",
        "manufacturer": "OMG_community",
        "sw_version": "esp32dev_rtl_433",
        "identifiers": [
            "3C71BF9E0770-1"
        ]
    },
    "~": "home/cc1101-bbbbbb/"
}
On the topic homeassistant/fan/9e0770_F1_1/config
And for the light I’m injecting this message
{
    "avty_t": "~LWT",
    "name": "Test Ceiling 1",
    "uniq_id": "3C71BF9E0770_LI_1",
    "pl_on": "{\"value\": 1150,\"protocol\": 6,\"length\": 12,\"delay\": 437,\"mhz\": 303.732}",
    "pl_off": "{\"value\": 1150,\"protocol\": 6,\"length\": 12,\"delay\": 437,\"mhz\": 303.732}",
    "pl_avail": "online",
    "pl_not_avail": "offline",
    "cmd_t": "~commands/MQTTto433",
    "device": {
        "name": "cc1101-9e0770",
        "model": "[\"BME280\",\"BH1750\",\"RF\",\"Pilight\",\"rtl_433\"]",
        "manufacturer": "OMG_community",
        "sw_version": "esp32dev_rtl_433",
        "identifiers": [
            "3C71BF9E0770-1"
        ]
    },
    "~": "home/cc1101-9e0770/"
}
On this topic homeassistant/light/9e0770_LI_1/config
In the files ‘9e0770’ is my OMG device
