Control window A/C with IR remote?

Hello, is there a simple way to control a window A/C with an IR remote with Home-assistant? I was thinking about a BroadLink device or ESPhome but it looks difficult.

as long the button available in your remote then its programmable and you can get the code to be installed into home-assistant

hay bro

I did this (mark 1)

found this and added it

and then I rewrote some of his python script logic

change to sensor_on and sensor_off ( its clearer in my mine)

add session to it

now I have this automation that look after my gas heater

and climate looks after the room temp

- id: Climate Livingroom
  alias: Climate Livingroom
  trigger:
    - platform: time_pattern
      hours: "*"
      minutes: 1 
    - platform: state
      entity_id: 
      - binary_sensor.front_door
      - binary_sensor.main_window
      - input_boolean.livingroom_climate
  condition: []
  action:
    - data:
        entity_id: climate.gas_heater
        hvac_active: heat
        sensors_on: # all these must be on
          - input_boolean.livingroom_climate      
          - binary_sensor.main_tv
        sensors_off:  # all these must be off 
          - binary_sensor.front_door
          - binary_sensor.main_window
        season:  # must be in one of there season
          - winter
          - autumn
        heating_from_hour: 17
        heating_to_hour: 22
      service: python_script.update_climate

HA now control the gas heater
I be adding more window /door sensors

Hello, was it difficult to get the BroadLink device to work with Homeassistant?