IR receiver climate overwrite raw code

Hi.

I have succesfully set up an Esp32, with a Dallas sensor, an IR receiver and an IR transmitter. The brand of my AC is Toshiba. The problem now is that my AC has an antistatic filter called “Pure” which cleans the air for small particles.

The built in codes from esphome does not work with the PURE mode.

I have managed to find raw codes which lets me turn on the PURE mode via switches. But, since the original remote sendes the pure code along the temperature setting, do I have to create switches for “20 degrees, heat with pure mode on”, “22 degrees, heat with pure mode on” and so on. A much better solution would be to just capture the correct codes and overwrite the codes which comes from esphome, when an automation triggers a temperature change. Does anyone know if this is possible?

No, generally it is not possible. You have to fork the component and add your codes there.

I understand. I have to clone the existing projects and add my changes to it. The part of getting the codes do I understand, but not sure how to install these changes to my existing or new esphome device (yet)

Usually use a custom_component mechanism:

https://esphome.io/custom/custom_component.html#