Control MaxxAir Fan with ESPHome and IR Transmitter

Hello, I’m currently getting started with my first ESPHome projects. I’d like to control the MaxxAir Fan (a roof fan) using ESPHome with the help of an IR transmitter. I’ve already gathered the commands for it and it seems to work with my config.

The fan has a separate command for each 10% increment, and it can also rotate in two different directions. This means there are at least 20 commands. Now, I want to control the fan in Lovelace using a slider instead of individual buttons. Currently, I’ve defined all the commands as buttons. How can I implement the ability to control the fan with one (or two for In and Out) sliders?

Below is my ESPHome configuration for the fan and an image of how it should look.

esphome:
  name: remotetransmittertest
  friendly_name: RemoteTransmitterTest

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "****************************************"

ota:
  password: "***************"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Remotetransmittertest"
    password: "************"

captive_portal:
    
# Example configuration entry
remote_transmitter:
  pin: D8
  carrier_duty_percent: 50%

# Individual switches
button:
  - platform: template
    name: "MaxxAir Open"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1744 750 894 1596 866 796 868 1618 874 790 864 796 1696 796 870 2450 6644 2494 868 5778 872 1618 5850 796 868 1620 862 4956 868 2450 5020 798 1694 1626 866 4120 866 3284 4196 794 2548 1604 2492 1664 1688 3290 7522 1616 1662 836 870 786 3360 1622 1668 828 3372 780 864 1624 868 8270 864 1628 2490 832 1690 1628 2540 788 866 792 1690 2460 872 792 5848"

  - platform: template
    name: "MaxxAir Close"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1744 750 894 1596 866 796 868 1618 874 790 864 796 1696 796 870 2450 6644 2494 868 5778 872 1618 5850 796 868 1620 862 4956 868 2450 5020 798 1694 1626 866 4120 866 3284 4196 794 2548 1604 2492 1664 1688 3290 7522 1616 1662 836 870 786 3360 1622 1668 828 3372 780 864 1624 868 8270 864 1628 2490 832 1690 1628 2540 788 866 792 1690 2460 872 792 5848"

  - platform: template
    name: "MaxxAir Out 0%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1698 794 872 1618 844 816 838 1650 844 818 836 824 1670 820 834 2484 6644 2492 838 5804 838 1652 5850 794 840 1646 836 4980 834 2482 5000 816 1698 1620 874 4110 866 3282 4200 788 2524 1628 2490 1662 1690 3286 2540 1614 3364 1614 1664 832 1692 1626 1694 1624 1708 786 3374 778 866 1620 874 8262 864 1628 2490 830 1692 1624 5020 796 870 2448 872 792 5852"

  - platform: template
    name: "MaxxAir Out 10%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1668 828 900 1590 870 788 866 1622 870 792 872 788 1726 766 866 2452 6640 2498 866 5780 872 1618 5850 796 870 1618 864 4952 862 2456 5024 794 1698 1620 862 4124 872 3276 4194 794 2514 1634 2492 1664 1688 3288 870 792 872 1620 862 798 1694 1624 1696 800 864 794 3334 1648 1662 830 3370 784 870 1620 862 8274 872 1618 2508 814 1690 1630 862 800 1662 2492 870 2448 862 802 5850"

  - platform: template
    name: "MaxxAir Out 20%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1664 828 868 1624 868 792 862 1624 890 774 870 792 1690 800 864 2452 6642 2496 866 5780 862 1628 5852 794 870 1618 834 4982 864 2454 5024 792 1690 1630 864 4120 866 3284 4196 792 2518 1632 2484 1672 1692 3284 862 802 862 1628 3370 1608 2540 786 866 794 2516 1634 1666 828 3372 780 864 1624 870 8266 868 1624 2492 830 1694 1624 838 2488 3368 2440 870 794 5848"

  - platform: template
    name: "MaxxAir Out 30%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1660 832 874 1616 866 794 870 1616 866 798 866 794 1700 792 872 2446 6648 2488 896 5750 892 1600 5848 796 870 1618 896 4920 872 2446 5024 792 1690 1630 874 4110 866 3284 4196 792 2520 1632 2484 1670 1692 3284 862 800 866 1626 3370 1608 1660 3326 2520 1630 1660 836 3366 786 868 1620 862 8274 872 1620 2486 836 1688 1628 864 800 864 1626 2492 2488 894 768 5852"

  - platform: template
    name: "MaxxAir Out 40%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1662 830 866 1626 868 792 872 1614 868 796 870 790 1690 800 866 2452 6642 2494 868 5778 864 1626 5844 800 864 1624 870 4946 868 2450 5020 798 1696 1624 870 4114 872 3278 4202 784 2514 1636 2492 1664 1688 3288 872 792 862 1628 3370 1610 3366 790 864 796 1696 1622 1668 826 3364 788 866 1622 870 8264 872 1620 2486 836 1688 1630 862 1630 862 2458 862 2454 866 798 5844"

  - platform: template
    name: "MaxxAir Out 50%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1696 796 868 1622 870 792 862 1624 870 794 870 788 1714 776 868 2450 6644 2494 868 5776 866 1624 5844 800 834 1654 840 4976 868 2448 5022 794 1666 1654 860 4122 864 3284 4196 794 2516 1632 2486 1670 1692 3312 806 830 834 1684 3314 1666 1634 864 1640 1682 1628 1688 1664 830 3318 834 832 1684 778 8330 806 1686 2462 860 1634 1684 808 856 3314 866 778 2540 780 856 5786"

  - platform: template
    name: "MaxxAir Out 60%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1672 824 842 1648 846 814 840 1648 844 818 838 824 1670 822 844 2474 6652 2484 838 5806 846 1644 5828 818 836 1652 840 4974 842 2476 4994 824 1668 1650 844 4142 844 3304 4166 822 2488 1660 2540 1614 1664 3312 836 826 838 1652 3346 1636 2512 3302 1662 1656 1718 776 3340 812 842 1646 838 8298 836 1654 2538 784 1666 1652 840 3316 844 816 840 2480 842 822 5820"

  - platform: template
    name: "MaxxAir Out 70%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1662 830 846 1644 838 824 842 1646 836 826 838 822 1662 828 838 2482 6648 2488 864 5780 872 1618 5854 790 866 1622 870 4946 868 2450 5022 794 1688 1630 862 4120 866 3282 4198 788 2524 1626 2490 1666 1698 3278 870 794 872 1618 3370 1610 1668 1658 2492 832 874 1610 1658 836 3364 786 868 1620 872 8262 864 1628 2490 832 1694 1624 868 794 870 792 864 794 870 3276 872 792 5854"

  - platform: template
    name: "MaxxAir Out 80%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1660 832 844 1646 836 824 840 1646 836 828 838 820 1662 828 836 2482 6700 2434 844 5800 844 1646 5826 818 836 1652 842 4972 842 2476 4996 820 1664 1654 838 4144 842 3308 4174 814 2488 1662 2540 1614 1664 3310 836 826 838 1652 3336 1642 4172 814 840 822 844 1642 1712 782 3344 806 838 1650 842 8292 844 1648 2544 778 1662 1654 838 1656 3342 3298 840 822 5820"

  - platform: template
    name: "MaxxAir Out 90%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1662 830 834 1654 838 824 842 1644 838 826 838 820 1662 830 836 2482 6646 2490 842 5802 840 1652 5818 824 842 1646 834 4980 844 2474 4996 820 1664 1656 836 4146 840 3310 4172 814 2498 1652 2496 1660 1660 3316 844 820 846 1644 3342 1636 1662 836 840 1648 834 826 838 1646 1664 832 3368 782 840 1648 846 8290 846 1646 2492 830 1662 1656 838 826 1666 824 1670 3308 840 824 5818"

  - platform: template
    name: "MaxxAir Out 100%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1666 830 836 1654 838 820 834 1654 840 822 842 818 1666 826 840 2480 6692 2442 836 5808 846 1646 5816 828 836 1650 842 4972 844 2474 4996 820 1662 1656 838 4146 840 3308 4174 814 2486 1662 2538 1616 1664 3312 836 826 838 1652 842 820 1662 1656 2546 778 1662 1662 842 1644 1668 824 3376 776 838 1650 842 8294 844 1646 2544 778 1664 1656 838 2488 842 814 840 3308 840 824 5820"

  - platform: template
    name: "MaxxAir In 0%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1666 828 838 1652 840 818 836 1652 842 820 834 826 1666 824 842 2476 6694 2440 838 5806 838 1652 5820 824 840 1648 834 4978 836 2482 4990 826 1668 1650 844 4142 834 3312 4170 818 2492 1654 2536 1618 1660 3314 3340 816 3366 1614 1664 830 1662 1656 1664 1654 1668 824 3346 808 836 1650 842 8292 844 1646 2544 778 1664 1654 2546 780 1660 828 838 2480 840 822 5822"

  - platform: template
    name: "MaxxAir In 10%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1666 828 836 1654 892 768 866 1622 870 790 896 766 1696 794 870 2448 6646 2488 864 5780 872 1618 5852 792 862 1626 868 4946 868 2450 5020 796 1696 1622 870 4114 872 3276 4194 794 2516 1632 2486 1670 1694 3282 866 796 1696 794 870 790 1692 1628 1694 802 864 794 3364 1616 1664 828 3372 782 862 1624 868 8268 868 1622 2484 838 1688 1632 872 790 864 3288 872 2446 864 800 5854"

  - platform: template
    name: "MaxxAir In 20%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1692 800 864 1626 868 794 872 1616 866 796 868 790 1692 800 866 2452 6646 2490 874 5772 870 1620 5850 794 870 1616 866 4950 864 2454 5028 788 1694 1626 866 4116 872 3278 4192 794 2516 1634 2494 1662 1690 3286 862 802 1692 798 3372 1608 2540 786 870 788 2522 1628 1662 834 3368 784 872 1616 876 8260 866 1626 2492 830 1694 1624 870 1622 4194 2448 872 790 5856"

  - platform: template
    name: "MaxxAir In 30%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1664 830 866 1624 870 790 864 1624 870 792 872 788 1696 796 870 2448 6646 2488 864 5780 872 1618 5852 792 864 1624 870 4944 870 2448 5022 794 1698 1620 862 4122 864 3282 4200 788 2524 1626 2534 1620 1692 3284 864 800 1694 798 3374 1606 1694 3290 2484 1666 1666 826 3374 778 866 1622 872 8262 864 1626 2532 788 1694 1624 868 794 1668 824 2488 2492 870 792 5852"

  - platform: template
    name: "MaxxAir In 40%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1666 828 836 1652 840 818 836 1652 842 820 844 816 1668 824 842 2476 6692 2444 836 5808 844 1646 5816 828 838 1650 844 4970 844 2474 4998 818 1664 1652 840 4144 844 3302 4168 820 2490 1658 2542 1612 1668 3308 842 822 1670 820 3340 1640 3338 818 838 822 1660 1658 1664 830 3340 812 844 1644 838 8298 838 1650 2540 780 1660 1658 834 4980 834 2482 838 826 5818"

  - platform: template
    name: "MaxxAir In 50%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1698 794 870 1618 864 796 868 1618 864 798 866 794 1690 800 864 2454 6644 2490 872 5772 870 1620 5852 792 872 1614 868 4948 866 2452 5020 796 1698 1620 874 4110 866 3282 4200 788 2522 1626 2492 1664 1690 3286 874 790 1692 798 3372 1606 1662 836 1690 1628 1692 1626 1716 778 3372 780 864 1624 870 8266 870 1622 2484 836 1698 1620 862 800 864 798 1696 792 864 2454 866 798 5848"

  - platform: template
    name: "MaxxAir In 60%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1660 832 864 1626 866 792 874 1614 868 794 870 790 1692 798 866 2452 6644 2490 872 5772 838 1652 5852 792 872 1614 868 4948 868 2450 5022 796 1698 1620 864 4122 866 3282 4200 790 2522 1626 2492 1664 1698 3278 870 794 1690 800 3370 1612 2536 3278 1700 1620 1658 834 3368 784 870 1618 876 8260 866 1624 2492 828 1696 1622 870 1622 870 790 864 796 868 2450 872 792 5854"

  - platform: template
    name: "MaxxAir In 70%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1662 832 866 1624 868 790 864 1624 868 794 872 788 1694 796 868 2450 6648 2488 864 5780 864 1626 5846 798 866 1620 872 4940 864 2454 5028 788 1694 1622 870 4116 872 3276 4196 792 2520 1628 2540 1616 1694 3280 870 794 1698 790 3368 1612 1698 1624 2494 830 866 1620 1660 834 3368 784 838 1650 844 8290 836 1654 2536 786 1666 1652 840 822 2542 780 842 3306 844 820 5824"

  - platform: template
    name: "MaxxAir In 80%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1668 826 840 1650 842 818 838 1650 844 820 834 826 1668 822 844 2474 6644 2492 840 5804 838 1650 5852 792 874 1614 868 4946 838 2480 4992 824 1668 1650 844 4140 836 3312 4170 818 2492 1656 2536 1618 1660 3314 846 818 1662 828 3374 1604 4170 816 838 824 842 1644 1666 826 3376 776 836 1650 842 8292 844 1646 2534 786 1664 1654 838 2488 2488 3318 842 820 5824"

  - platform: template
    name: "MaxxAir In 90%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1668 826 840 1650 842 818 838 1650 844 820 834 826 1668 822 844 2474 6644 2492 840 5804 838 1650 5852 792 874 1614 868 4946 838 2480 4992 824 1668 1650 844 4140 836 3312 4170 818 2492 1656 2536 1618 1660 3314 846 818 1662 828 3374 1604 4170 816 838 824 842 1644 1666 826 3376 776 836 1650 842 8292 844 1646 2534 786 1664 1654 838 2488 2488 3318 842 820 5824"

  - platform: template
    name: "MaxxAir In 100%"
    icon: mdi:fan
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "1662 830 834 1658 836 824 842 1644 838 826 870 790 1662 828 836 2480 6648 2488 874 5770 840 1650 5854 790 866 1622 870 4944 840 2478 5024 790 1692 1626 866 4116 870 3278 4194 792 2518 1632 2486 1668 1696 3280 868 796 1666 824 872 786 1696 1622 2548 776 1696 1628 866 1620 1712 782 3368 784 870 1616 866 8270 866 1626 2492 828 1696 1622 872 1620 1690 802 874 3274 864 798 5846"


image
Source:

currently it looks like this:

hi, any progress ? The cod do not work on a esp8266 with newer ESPHOME, changing the IR code to a JVC one is working, but the code for maxxfan is not send outt (LED stays red).

regards Stefan

hi, found a way, switching from pronto to raw works for me …

Can you provide the raw codes you are using?

yaeh, currently we finalize the codes, will send than …

Its not difficult to record IR or RF signals/codes from your remotes and is something worth lesrning because, remotes arent always going to match so, its much simpler to just record them yourself.

For me, it’s also not working very reliable. Sometimes it’s working very well, sometimes it’s not working. In the logs of esphome I can see that commands are sent out but with some kind of time out. I don’t know why.

code is the same but it wasn’t the first post

How is your transmitter hardware? IR led powered from gpio?
Did you manage to make your “slider”?

Also, your data doesn’t look pronto format, it looks more raw to me.

Yes, a friend of me managed to do it. without editing the code in ESP home but with doing some automations and scripts and with helpers.

Hardware like you discribed. Transmitter on GPIO port of D1mini

Transmitter module or just a led?

With this one here.

For sure this doesn’t give good range, for certain distance or sunlight it’s probably not seen well by receiver. This is kind of fake module, it’s missing transistor circuit to properly power that led.

Sure it’s because of a bad component?

I put the transmitter directly into the fan and removed the ir receiver of the fan from the original position so that it is just 1cm away from the transmitter.

And when it’s working it’s working really good. Without any missing ir commands. And if it’s not working I can press it 100 times and it does nothing.

That’s because I think it’s more a code problem. Especially with the error/warning messages because of a time out that I receive.

It’s both.
That module can’t give a good signal and on the other hand your gpio pin could not supply it.

Also, your pronto data is so weird that I’m surprised that it ever works.
Where did you get that?

Also, in your code I don’t see modulation frequency set anywhere and I was not able to find if it’s coded to “pronto library”. Default is 0. Yours, I expect 38.

I don’t know anymore to be honest. What I know is that I needed to convert the commands that I have found. Because otherwise it was not working.
Ah now. I captured the IR codes with flipper. - a device to capture ir signals (and for a lot of other stuff). And then I had to convert them. But the codes are working. I don’t think that there is a problem with the IR codes but maybe with the rest of the esp code.

Or both. I don’t have Flipper, but I’m quite sure you can force it to give raw codes.
It’s difficult case if we can’t exclude any parts of possible problems. That pronto code is not “correct pronto”, raw data would be more useful.
Also hardware sucks, If that module draws 10ma, it’s too weak. If it draws more than 20mA, esp32 can’t handle it with whatever consequences. IR-Led driven correctly, should draw around 100ma, personally I draw them 500-1000mA for extended range.

You could try adding this to your code:
carrier_frequency: 38kHz

I already have that in my code. Just checked that I also have raw code now. Sorry. Almost a half year I made it. My code looks like this:

… i am not able to copy it with my phone. So just a picture for now.

@Tidle Any chance you can upload all that you build to support your maxxair fan? Pretty please

Sorry for the late reply. was not able to copy the code with my phone. but now i have access to my laptop again, so here it is:

esphome:
  name: remotetransmittertest
  friendly_name: RemoteTransmitterTest

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: ""

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Remotetransmittertest"
    password: ""

captive_portal:

#remote_receiver:
#  pin: 
#    number: D3
#    inverted: true
#  dump: all

sensor:
  - platform: dht
    pin: D2
    temperature:
      name: "Dachlüfter Temperatur"
    humidity:
      name: "Dachlüfter Feuchtigkeit"
    update_interval: 60s
    
# Example configuration entry
remote_transmitter:
  pin: D8
  carrier_duty_percent: 50%


button: 
 
  - platform: template
    name: "MaxxAir Close"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1616, -852, 808, -1678, 780, -854, 808, -1676, 780, -855, 807, -854, 1618, -853, 780, -2501, 6591, -2495, 780, -5800, 809, -1676, 5730, -850, 807, -1676, 781, -4977, 808, -2499, 4918, -849, 1622, -1675, 808, -4148, 780, -3325, 4109, -850, 2431, -1675, 2456, -1673, 1621, -3323, 7405, -1672, 1618, -852, 780, -853, 3271, -1673, 1646, -853, 3266, -850, 779, -1674, 809, -8266, 781, -1680, 2457, -851, 1619, -1674, 2431, -852, 807, -854, 1618]

  - platform: template
    name: "MaxxAir Out 0%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1619, -853, 804, -1679, 778, -854, 805, -1650, 804, -856, 804, -829, 1642, -827, 804, -2497, 6583, -2469, 803, -5795, 804, -1650, 5773, -824, 804, -1647, 803, -4969, 805, -2472, 4960, -825, 1639, -1650, 804, -4125, 828, -3298, 4096, -824, 2450, -1672, 2451, -1674, 1637, -3293, 3260, -851, 3260, -1671, 1640, -828, 803, -854, 3263, -1647, 1639, -853, 3288, -826, 803, -1651, 803, -8254, 829, -1628, 2474, -826, 1639, -1648, 2452, -2474, 1637]

  - platform: template
    name: "MaxxAir Out 10%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1620, -850, 809, -1678, 779, -853, 807, -1677, 780, -856, 806, -854, 1618, -851, 779, -2498, 6588, -2492, 779, -5799, 805, -1676, 5725, -850, 808, -1676, 780, -4977, 808, -2498, 4916, -850, 1619, -1674, 810, -4150, 780, -3322, 4110, -851, 2431, -1675, 2457, -1676, 1620, -3323, 806, -856, 780, -1704, 781, -855, 1618, -1676, 1619, -854, 780, -852, 3272, -1672, 1620, -852, 3270, -852, 807, -1677, 780, -8269, 808, -1679, 2432, -852, 1620, -1674, 809, -855, 1621, -2501, 808]

  - platform: template
    name: "MaxxAir Out 20%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1647, -823, 808, -1705, 779, -854, 780, -1703, 781, -855, 808, -825, 1650, -823, 809, -2499, 6559, -2492, 807, -5775, 806, -1676, 5757, -850, 808, -1647, 809, -4974, 807, -2472, 4944, -821, 1648, -1646, 808, -4150, 807, -3294, 4135, -822, 2457, -1673, 2458, -1649, 1646, -3295, 808, -855, 808, -1649, 3296, -1647, 2482, -822, 808, -854, 2458, -1646, 1647, -823, 3297, -821, 809, -1677, 807, -8242, 808, -1680, 2458, -823, 1648, -1647, 808, -2502, 3268]

  - platform: template
    name: "MaxxAir Out 30%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1671, -829, 807, -1650, 834, -829, 807, -1645, 833, -831, 806, -824, 1646, -825, 830, -2475, 6591, -2497, 804, -5772, 806, -1646, 5780, -826, 806, -1647, 831, -4946, 806, -2470, 4941, -820, 1648, -1646, 837, -4123, 832, -3297, 4105, -822, 2483, -1649, 2454, -1645, 1647, -3293, 833, -831, 807, -1652, 3318, -1648, 1643, -3295, 2454, -1644, 1647, -825, 3294, -821, 833, -1652, 806, -8241, 834, -1655, 2457, -823, 1649, -1646, 835, -857, 805, -1653, 2457]

  - platform: template
    name: "MaxxAir Out 40%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1642, -827, 831, -1651, 805, -854, 805, -1649, 779, -853, 834, -828, 1643, -825, 780, -2500, 6562, -2494, 834, -5767, 779, -1673, 5752, -848, 834, -1649, 779, -4970, 835, -2473, 4939, -823, 1644, -1648, 779, -4147, 834, -3290, 4127, -824, 2427, -1670, 2480, -1646, 1643, -3293, 779, -853, 836, -1650, 3294, -1645, 3265, -848, 837, -826, 1644, -1646, 1645, -825, 3293, -824, 779, -1675, 835, -8231, 779, -1677, 2484, -824, 1644, -1646, 779, -1675, 836, -2472, 779]

  - platform: template
    name: "MaxxAir Out 50%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1669, -795, 834, -1651, 833, -800, 833, -1649, 832, -798, 834, -828, 1643, -794, 864, -2448, 6614, -2442, 858, -5746, 834, -1629, 5800, -796, 834, -1624, 859, -4924, 834, -2473, 4970, -798, 1671, -1624, 832, -4126, 830, -3270, 4132, -825, 2453, -1647, 2483, -1648, 1643, -3267, 858, -829, 830, -1625, 3292, -1647, 1670, -800, 1645, -1650, 1646, -1649, 1646, -827, 3295, -824, 834, -1652, 831, -8220, 832, -1590, 2519, -825, 1670, -1649, 803, -829, 3292, -824, 834]

  - platform: template
    name: "MaxxAir Out 60%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1619, -852, 810, -1650, 808, -853, 810, -1650, 807, -853, 809, -825, 1649, -823, 808, -2498, 6561, -2492, 807, -5795, 807, -1646, 5750, -849, 807, -1646, 808, -4970, 807, -2470, 4945, -819, 1649, -1646, 809, -4152, 806, -3320, 4104, -822, 2456, -1673, 2456, -1645, 1648, -3291, 808, -855, 808, -1646, 3300, -1644, 2486, -3295, 1649, -1645, 1650, -823, 3299, -821, 809, -1677, 808, -8243, 810, -1679, 2458, -822, 1651, -1645, 810, -3328, 807, -855, 807]

  - platform: template
    name: "MaxxAir Out 70%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1645, -828, 809, -1650, 810, -854, 809, -1652, 806, -855, 809, -824, 1651, -823, 810, -2502, 6596, -2467, 809, -5799, 808, -1647, 5754, -850, 807, -1648, 809, -4976, 808, -2472, 4946, -850, 1619, -1676, 808, -4125, 832, -3300, 4110, -823, 2481, -1651, 2480, -1652, 1643, -3300, 808, -827, 808, -1678, 3269, -1675, 1643, -1653, 2460, -824, 832, -1653, 1620, -853, 3270, -852, 808, -1651, 807, -8294, 780, -1680, 2459, -822, 1650, -1646, 810, -855, 809, -824, 810, -854, 809]

  - platform: template
    name: "MaxxAir Out 80%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1646, -823, 809, -1674, 808, -826, 809, -1673, 809, -826, 809, -850, 1622, -849, 808, -2469, 6594, -2491, 808, -5768, 810, -1674, 5754, -821, 810, -1672, 810, -4946, 812, -2475, 4940, -847, 1621, -1672, 809, -4147, 809, -3295, 4109, -823, 2482, -1644, 2457, -1669, 1620, -3293, 832, -827, 810, -1651, 3321, -1646, 4107, -847, 809, -824, 810, -1675, 1621, -827, 3296, -849, 808, -1649, 808, -8240, 830, -1651, 2458, -849, 1621, -1673, 809, -1676, 3269]

  - platform: template
    name: "MaxxAir Out 90%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1619, -848, 811, -1678, 780, -854, 807, -1675, 780, -852, 809, -830, 1642, -851, 781, -2499, 6591, -2494, 779, -5800, 806, -1675, 5727, -848, 809, -1676, 779, -4973, 809, -2498, 4917, -847, 1622, -1674, 809, -4150, 781, -3321, 4109, -850, 2430, -1671, 2459, -1674, 1620, -3321, 811, -854, 781, -1677, 3269, -1671, 1621, -851, 809, -1677, 781, -852, 809, -1676, 1619, -852, 3268, -849, 782, -1674, 810, -8264, 810, -1677, 2428, -848, 1619, -1671, 808, -853, 1617, -851, 1618]

  - platform: template
    name: "MaxxAir Out 100%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1647, -851, 780, -1678, 807, -853, 782, -1675, 809, -854, 780, -852, 1620, -850, 808, -2498, 6565, -2493, 781, -5799, 809, -1675, 5754, -849, 781, -1673, 810, -4972, 780, -2498, 4914, -846, 1620, -1672, 808, -4147, 780, -3322, 4104, -849, 2458, -1673, 2432, -1673, 1622, -3323, 808, -855, 781, -1677, 809, -853, 1620, -1674, 2457, -851, 1619, -1676, 779, -1673, 1622, -851, 3270, -848, 810, -1676, 781, -8270, 832, -1655, 2430, -849, 1622, -1673, 834, -2477, 780, -852, 834]

  - platform: template
    name: "MaxxAir In 0%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1619, -853, 804, -1679, 778, -854, 805, -1650, 804, -856, 804, -829, 1642, -827, 804, -2497, 6583, -2469, 803, -5795, 804, -1650, 5773, -824, 804, -1647, 803, -4969, 805, -2472, 4960, -825, 1639, -1650, 804, -4125, 828, -3298, 4096, -824, 2450, -1672, 2451, -1674, 1637, -3293, 3260, -851, 3260, -1671, 1640, -828, 803, -854, 3263, -1647, 1639, -853, 3288, -826, 803, -1651, 803, -8254, 829, -1628, 2474, -826, 1639, -1648, 2452, -2474, 1637]

  - platform: template
    name: "MaxxAir In 10%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1619, -852, 781, -1677, 808, -854, 780, -1675, 832, -831, 780, -851, 1622, -852, 831, -2476, 6564, -2493, 835, -5774, 780, -1676, 5783, -824, 780, -1677, 834, -4944, 779, -2498, 4968, -822, 1645, -1648, 780, -4151, 837, -3296, 4079, -850, 2487, -1648, 2431, -1674, 1676, -3297, 780, -853, 1623, -852, 3272, -1673, 1622, -852, 835, -828, 3296, -1648, 1619, -854, 3294, -825, 779, -1675, 836, -8239, 831, -1653, 2428, -851, 1618, -1673, 834, -829, 779, -2500, 1620]

  - platform: template
    name: "MaxxAir In 20%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1618, -851, 780, -1677, 832, -830, 779, -1674, 810, -854, 780, -852, 1621, -849, 810, -2500, 6565, -2494, 808, -5797, 780, -1672, 5778, -826, 778, -1673, 809, -4994, 779, -2495, 4934, -826, 1641, -1653, 779, -4152, 833, -3298, 4073, -847, 2482, -1648, 2478, -1651, 1642, -3296, 779, -854, 1619, -851, 3270, -1675, 2482, -827, 780, -853, 2484, -1649, 1618, -851, 3267, -851, 831, -1651, 780, -8267, 834, -1655, 2429, -850, 1620, -1674, 834, -1654, 4076]

  - platform: template
    name: "MaxxAir In 30%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1650, -822, 810, -1674, 809, -823, 811, -1674, 808, -823, 812, -851, 1621, -849, 810, -2472, 6595, -2492, 809, -5770, 809, -1672, 5753, -820, 809, -1672, 809, -4945, 810, -2497, 4948, -819, 1651, -1648, 809, -4147, 810, -3294, 4109, -848, 2461, -1645, 2462, -1674, 1648, -3296, 809, -854, 1622, -851, 3270, -1670, 1621, -3319, 2457, -1643, 1650, -824, 3298, -821, 810, -1673, 810, -8236, 810, -1676, 2458, -848, 1620, -1671, 809, -825, 1647, -822, 2459]

  - platform: template
    name: "MaxxAir In 40%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1620, -851, 833, -1652, 779, -850, 835, -1650, 779, -853, 833, -828, 1618, -849, 834, -2473, 6590, -2468, 779, -5796, 834, -1649, 5777, -824, 805, -1676, 806, -4947, 778, -2497, 4918, -848, 1620, -1674, 835, -4125, 779, -3322, 4132, -824, 2479, -1646, 2428, -1672, 1620, -3319, 834, -829, 1643, -826, 3289, -1646, 3291, -826, 779, -852, 1619, -1672, 1674, -827, 3294, -826, 780, -1676, 835, -8239, 780, -1678, 2484, -825, 1645, -1649, 779, -4973, 835]

  - platform: template
    name: "MaxxAir In 50%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1645, -826, 834, -1622, 838, -828, 834, -1621, 837, -829, 833, -800, 1675, -795, 838, -2473, 6622, -2443, 834, -5773, 833, -1621, 5786, -824, 833, -1623, 835, -4949, 834, -2446, 4979, -824, 1646, -1651, 834, -4101, 837, -3300, 4136, -797, 2487, -1649, 2485, -1650, 1645, -3296, 833, -801, 1674, -798, 3325, -1621, 1675, -798, 1677, -1624, 1677, -1622, 1675, -797, 3326, -826, 807, -1680, 807, -8249, 833, -1627, 2487, -825, 1647, -1649, 834, -801, 835, -804, 1670, -827, 832]

  - platform: template
    name: "MaxxAir In 60%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1619, -851, 808, -1648, 809, -853, 807, -1649, 835, -827, 807, -854, 1619, -851, 808, -2472, 6594, -2467, 807, -5797, 809, -1647, 5786, -819, 811, -1676, 809, -4950, 808, -2478, 4940, -849, 1619, -1676, 807, -4124, 809, -3324, 4107, -850, 2459, -1645, 2459, -1675, 1619, -3322, 809, -826, 1650, -824, 3299, -1645, 2488, -3297, 1648, -1647, 1648, -823, 3299, -822, 809, -1677, 809, -8246, 809, -1679, 2460, -822, 1651, -1647, 810, -1680, 808, -825, 809, -854, 809]

  - platform: template
    name: "MaxxAir In 70%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1649, -822, 810, -1679, 808, -824, 810, -1676, 808, -825, 809, -855, 1619, -852, 809, -2472, 6596, -2494, 809, -5773, 809, -1676, 5758, -819, 810, -1675, 807, -4975, 780, -2527, 4920, -821, 1650, -1646, 810, -4152, 808, -3296, 4108, -851, 2460, -1647, 2486, -1646, 1649, -3293, 810, -856, 1619, -853, 3270, -1675, 1620, -1677, 2460, -824, 808, -1677, 1620, -879, 3270, -821, 809, -1676, 807, -8235, 808, -1680, 2458, -823, 1649, -1647, 809, -855, 2459, -824, 807]

  - platform: template
    name: "MaxxAir In 80%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1651, -824, 809, -1676, 810, -825, 810, -1674, 811, -853, 811, -825, 1651, -825, 808, -2499, 6571, -2492, 810, -5776, 809, -1674, 5755, -847, 810, -1649, 809, -4974, 809, -2475, 4946, -820, 1650, -1647, 810, -4150, 810, -3297, 4138, -821, 2461, -1672, 2462, -1646, 1650, -3296, 809, -854, 1622, -851, 3275, -1673, 4113, -850, 810, -825, 811, -1676, 1622, -851, 3275, -850, 811, -1649, 810, -8272, 810, -1653, 2460, -850, 1622, -1674, 810, -2475, 2460]

  - platform: template
    name: "MaxxAir In 90%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1646, -827, 780, -1677, 834, -827, 780, -1673, 836, -828, 779, -852, 1671, -824, 780, -2497, 6566, -2492, 836, -5771, 780, -1674, 5764, -849, 836, -1650, 781, -4978, 836, -2474, 4947, -824, 1647, -1649, 780, -4149, 837, -3294, 4133, -823, 2429, -1670, 2486, -1647, 1645, -3295, 781, -854, 1623, -850, 3272, -1672, 1623, -850, 838, -1651, 781, -852, 837, -1650, 1619, -851, 3271, -847, 839, -1649, 780, -8274, 838, -1652, 2432, -849, 1623, -1675, 837, -828, 781, -1678, 1622]

  - platform: template
    name: "MaxxAir In 100%"
    icon: mdi:fan
    on_press:
          - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [1622, -852, 809, -1679, 781, -852, 810, -1677, 782, -855, 808, -854, 1620, -852, 781, -2499, 6601, -2495, 781, -5803, 810, -1676, 5733, -851, 807, -1675, 781, -4976, 808, -2499, 4920, -847, 1624, -1676, 808, -4152, 781, -3323, 4112, -850, 2433, -1673, 2460, -1674, 1625, -3324, 810, -855, 1622, -853, 781, -851, 1625, -1674, 2463, -851, 1621, -1652, 806, -1676, 1622, -851, 3296, -850, 780, -1675, 809, -8262, 780, -1681, 2459, -851, 1620, -1675, 781, -1678, 1623, -852, 809]

i think there is a lot of room for improvement.
first of all its working not reliable. at the beginning it worked great, but now (without any changes) its working in 10%. might be an hardware problem as @Karosm explained already.
then it should be possible to gener ate one fan entity out of it,instead of soo many entitties for any command. but its possible to put them together in Home assistant afterwards, like i have shown in my screenshot.
so any ideas here? or someone who can test it with better hardware? i am at vacation and not able to order any parts right now.

I see from raw data that it’s not gonna be easiest one. 90% or ir protocols have similar logic and quite easy to grab the timings and convert to binary. But this is really wild…
Playing with raw data is the last option, because every step has quite large error. Already that cheap “original remote” has error in output, Flipper receiver has another and esp sending it out has third. Final output can be quite far from what maxxair receiver decoder expects. But generally tolerances in IR decoders are quite big.

The worst part is weak transmitter (ir led). If signal is weak, just little bit sunlight can wash it out. Fortunately, that part is easy to resolve. You only need transistor, and you can drive led 10X.