ESPHome CC1101 Success with MinkaAire Ceiling Fan (303.875 MHz)

I recently set up the new ESPHome CC1101 component on an ESP32 DevKit board and wanted to share some findings that may help others.

Hardware
ESP32 DevKit VROOM
CC1101 8-pin module

Wiring:
CC1101 Pin 1 GND → ESP32 GND
CC1101 Pin 2 VCC → ESP32 3.3V
CC1101 Pin 3 GDO0 → GPIO26
CC1101 Pin 4 CSN → GPIO5
CC1101 Pin 5 SCK → GPIO18
CC1101 Pin 6 MOSI → GPIO23
CC1101 Pin 7 MISO → GPIO19
CC1101 Pin 8 GDO2 → GPIO27

Initial Results
The CC1101 initialized correctly and could immediately receive RF traffic.
The fan remote turned out to operate on 303.875 MHz rather than 433.92 MHz.

Using frequency: 303.875MHz allowed reliable reception of the MinkaAire remote. And,
ESPHome successfully decoded button presses using:

remote_receiver:
  pin: GPIO27
  dump:
    - rc_switch
  tolerance: 50%
  filter: 100us
  idle: 10ms
  buffer_size: 30kb

Example decoded values:
Stop: 000000111101
Speed 1: 000000110111
Speed 2: 000000110101
Speed 3: 000000101111
Speed 4: 000000100111
Speed 5: 000000011101
Speed 6: 000000011111
Reverse: 000000111011
An end code of:
000000111111
was transmitted after commands.

However this produced weak and unreliable operations transmitting the codes using:

- remote_transmitter.transmit_rc_switch_raw:

and the fan would only respond at very close range and often required multiple attempts.

Solution
Switching to raw codes produced dramatically better results. Captured the original remote waveform with:

remote_receiver:
  pin: GPIO27
  dump:
    - raw
  tolerance: 50%
  filter: 100us
  idle: 10ms
  buffer_size: 30kb

and replayed the captured waveform using for example this button for Stop:

 - platform: template
   name: MinkaAire Stop
   on_press:
     - remote_transmitter.transmit_raw:
         code: [300, -376, 650, -376, 625, -400, 626, -375, 651, -375, 625, -376, 650, -701, 300, -726, 300, -700, 301, -725, 301, -375, 625, -726, 300]
         repeat:
           times: 16
           wait_time: 20ms

Home assistant performance became comparable to the original remote and reliability improved substantially.

Recommendation
If you can successfully decode a device with rc_switch but transmission is unreliable, try capturing the actual waveform and replaying it with transmit_raw rather than relying on protocol-based retransmission.

For my MinkaAire fan this was the difference between "barely works" and "works like the factory remote."

If you set high tolerance, you always can get signal decoded with rc-switch. But it's total crap at certain point. 50% is not usable in any case.
And yes, always start with raw, at least you see how the real signal is.