IR Sender doesn't work with my Fan

I have a round IR sender / receiver from China. I have flashed it to ESPHome.

I can manage devices that use NEC codes.

Now I want to control a fan.

I see messages in the logs:
[11:16:59] [D] [remote.rc_switch: 256]: Received RCSwitch Raw: protocol = 4 data = '11011000000'

I created a switch:

  - platform: template
    name: "fan_off"
    turn_on_action:
      remote_transmitter.transmit_rc_switch_raw:
        code: '11011000000'
        protocol: 4

But nothing works. What am I doing wrong?

Um… Is it an IR fan? Not RF?

Yes. I check it with phone cam

I’ve also been experiencing the same thing with my Honeywell fan. I’ve tried everything, from transmitting raw, to playing around with carrier frequencies. Have you found a solution? Here is my IR data.

[D][remote.pronto:229]: Received Pronto: data=0000 006D 0018 0000 0031 0012 0030 0012 000F 0032 0030 0012 0030 0012 000F 0032 000F 0033 000F 0032 000F 0032 000F 0032 000F 0033 002F 0118 0030 0012 0030 0012 000F 0033 0030 0012 0030 0012 000F 0032 000F 0032 000F 0032 000F 0032 000F 0032 000F 0032 0030 06C3
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='11011000000'

I don’t know if it will work with your fan, but I use the following with my 8 speed Honeywell tower-style fan.

Send Command Script
alias: Living Room Fan - Send Command
fields:
  command:
    name: Command
    description: The command you want to send to the fan
    example: "on"
    required: true
    selector:
      select:
        options:
          - label: "Off"
            value: "off"
          - label: "On"
            value: "on"
          - label: Increase Speed
            value: speedUp
          - label: Decrease Speed
            value: speedDown
          - label: Oscillate
            value: oscillate
sequence:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ repeats > 0 }}"
        sequence:
          - alias: Send IR Command 'count' times
            repeat:
              count: "{{ repeats }}"
              sequence:
                - delay: 1
                - service: esphome.ble_router_1_send_raw_command
                  data:
                    command: "{{ code }}"
                - delay: 4
    default:
      - service: esphome.ble_router_1_send_raw_command
        data:
          command: "{{ code }}"
mode: single
variables:
  repeats: |
    {{ iif(command == "speedDown", 7, 0) }}
  commands:
    power: >-
      [433, -1254, 1278, -407, 439, -1252, 433, -8112,  1277, -408, 1279, -409,
      435, -1255, 1276, -409,  1279, -408, 436, -1255, 432, -1255, 433, -1256,
      433, -1254, 1277, -409, 435, -1255, 433, -8111, 1277, -408, 1279, -409,
      435, -1255, 1277, -409, 433, -1254, 1278, -407, 439, -1252, 433, -8112, 
      1277, -408, 1279, -409, 435, -1255, 1276, -409,  1279, -408, 436, -1255,
      432, -1255, 433, -1256, 433, -1254, 1277, -409, 435, -1255, 433, -8111,
      1277, -408, 1279, -409, 435, -1255, 1277, -409]
    speed: >-
      [435, -8111, 1278, -407, 1280, -412, 433, -1253, 1277, -410, 1279,
      -407,1280, -408, 436, -1256,  432, -1253, 435, -1256, 1276, -408,
      1280,-408,  435, -8118, 1273, -408, 1279, -409, 436, -1255, 1279, -406,
      1280,-408, 1280, -407, 436, -1256,  435, -8111, 1278, -407, 1280, -412,
      433, -1253, 1277, -410, 1279, -407,1280, -408, 436, -1256,  432, -1253,
      435, -1256, 1276, -408, 1280,-408,  435, -8118, 1273, -408, 1279, -409,
      436, -1255, 1279, -406, 1280,-408, 1280, -407, 436, -1256]
    oscillate: >-
      [1280, -409, 1278, -408, 436, -1253, 436, -1252,  434, -1255, 433, -1254,
      1276, -409, 1278, -7268, 1275, -409, 1279, -408, 436, -1271, 1259, -409,
      1280, -407, 1280, -410, 433, -1255, 434, -1253, 434, -1254, 434, -1254,
      1279, -405, 1280, -7265, 1280, -409, 1278, -408, 436, -1253, 436, -1252, 
      434, -1255, 433, -1254, 1276, -409, 1278, -7268, 1275, -409, 1279, -408,
      436, -1271, 1259, -409, 1280, -407, 1280, -410, 433, -1255, 434, -1253,
      434, -1254, 434, -1254, 1279, -405, 1280, -7265]
  code: >
    {% if command in ["speedDown","speedUp"]%} {% set command = "speed" %} {%
    elif command in ["on","off"]%} {% set command = "power" %} {% endif %} {{
    commands.get(command) }}