Error compiling for heatpumpir

Hi, the device is a tuya remote with esp32c3 to control my mitsubishi ac.
The mitsubishi climate component didn’t work so I wanted to switch to heatpumpir.
But I keep getting this error, no matter which mitsubishi protocol i selected.

Error logs:

|-- IRremoteESP8266 @ 2.7.12
Compiling .pioenvs/esp32c3-remote/src/main.cpp.o
Compiling .pioenvs/esp32c3-remote/libbe5/IRremoteESP8266/IRrecv.cpp.o
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp: In member function 'uint32_t IRrecv::ticksLow(uint32_t, uint8_t, uint16_t)':
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:926:8: error: no matching function for call to 'max(int32_t, int)'
       0));
        ^
In file included from /data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/algorithm:61,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:162,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.h:10,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:6:
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algobase.h:219:5: note: candidate: 'template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)'
     max(const _Tp& __a, const _Tp& __b)
     ^~~
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algobase.h:219:5: note:   template argument deduction/substitution failed:
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:926:8: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
       0));
        ^
In file included from /data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/algorithm:61,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:162,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.h:10,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:6:
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algobase.h:265:5: note: candidate: 'template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algobase.h:265:5: note:   template argument deduction/substitution failed:
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:926:8: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
       0));
        ^
In file included from /data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/algorithm:62,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:162,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.h:10,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:6:
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3462:5: note: candidate: 'template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)'
     max(initializer_list<_Tp> __l)
     ^~~
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3462:5: note:   template argument deduction/substitution failed:
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:926:8: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
       0));
        ^
In file included from /data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/algorithm:62,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:162,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.h:10,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:6:
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3468:5: note:   template argument deduction/substitution failed:
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:926:8: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
       0));
        ^
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp: In member function 'bool IRrecv::matchAtLeast(uint32_t, uint32_t, uint8_t, uint16_t)':
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:1009:77: error: no matching function for call to 'min(uint32_t&, unsigned int)'
   return measured >= ticksLow(std::min(desired, MS_TO_USEC(irparams.timeout)),
                                                                             ^
In file included from /data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/algorithm:61,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:162,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.h:10,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:6:
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algobase.h:195:5: note: candidate: 'template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)'
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:1009:77: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'unsigned int')
   return measured >= ticksLow(std::min(desired, MS_TO_USEC(irparams.timeout)),
                                                                             ^
In file included from /data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/algorithm:61,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:162,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.h:10,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:6:
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algobase.h:243:5: note: candidate: 'template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:1009:77: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'unsigned int')
   return measured >= ticksLow(std::min(desired, MS_TO_USEC(irparams.timeout)),
                                                                             ^
In file included from /data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/algorithm:62,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:162,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.h:10,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:6:
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3450:5: note: candidate: 'template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)'
     min(initializer_list<_Tp> __l)
     ^~~
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3450:5: note:   template argument deduction/substitution failed:
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:1009:77: note:   mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
   return measured >= ticksLow(std::min(desired, MS_TO_USEC(irparams.timeout)),
                                                                             ^
In file included from /data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/algorithm:62,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:162,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.h:10,
                 from .piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:6:
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3456:5: note: candidate: 'template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/data/cache/platformio/packages/[email protected]+2021r2-patch5/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3456:5: note:   template argument deduction/substitution failed:
.piolibdeps/esp32c3-remote/IRremoteESP8266/src/IRrecv.cpp:1009:77: note:   mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
   return measured >= ticksLow(std::min(desired, MS_TO_USEC(irparams.timeout)),
                                                                             ^
*** [.pioenvs/esp32c3-remote/libbe5/IRremoteESP8266/IRrecv.cpp.o] Error 1
========================= [FAILED] Took 17.31 seconds =========================

esphome config

esphome:
  name: esp32c3-remote
  friendly_name: esp32c3-remote

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password
    priority: 1
  - ssid: !secret wifi2_ssid
    password: !secret wifi2_password
    priority: 2
  output_power: 10dB
  # use_address: 192.168.1.38
  
ota:

logger:

api:

web_server:
  port: 80

status_led:
  pin:
    number: GPIO7
    # inverted: False

button:
- platform: restart
  name: Restart
# - platform: gpio
#   pin: GPIO6
#   name: Remote button

remote_receiver:
  id: ir_receiver
  pin: GPIO3
  dump: all

remote_transmitter:
  pin: GPIO4
  carrier_duty_percent: 50%

climate:
  - platform: heatpumpir
    protocol: mitsubishi_heavy_zm    # adjust to match your AC unit!
    name: "Living Room Air Con"
    max_temperature: 28.0
    min_temperature: 18.0
    horizontal_default: auto
    vertical_default: auto
    # receiver_id: ir_receiver
    # sensor: living_room_temperature

Any thoughts on this?

Looks like there’s some issues on esp32c3 with heatpumpir that needs to be updated & receiver
I’ve included temporary fix in the config (until the PR is merged or fixed in the next esphome update) if anyone’s having the same problem.

esphome:
  name: esp32c3-remote
  friendly_name: esp32c3-remote

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password
    priority: 1
  - ssid: !secret wifi2_ssid
    password: !secret wifi2_password
    priority: 2
  output_power: 10dB
  # use_address: 192.168.1.38
  
ota:

logger:

api:

web_server:
  port: 80

status_led:
  pin:
    number: GPIO7
    inverted: True

button:
- platform: restart
  name: Restart
# - platform: gpio
#   pin: GPIO6
#   name: Remote button

external_components:
  - source: github://Jorre05/remote_receiver
    components: [ remote_receiver ]

  - source: github://pr#4499
    components: [ heatpumpir ]

remote_receiver:
  id: rcvr
  pin:
    number: GPIO3
    inverted: True
  rmt_channel: 2
  tolerance: 55%
  dump: all

remote_transmitter:
  pin: GPIO4
  carrier_duty_percent: 50%

climate:
  # - platform: mitsubishi       # adjust to match your AC unit!
  #   name: "Living Room AC"  
  - platform: heatpumpir
    protocol: mitsubishi_heavy_zm    # adjust to match your AC unit!
    name: "Living Room Air Con"
    max_temperature: 28.0
    min_temperature: 18.0
    horizontal_default: auto
    vertical_default: auto