Action(s) according to receiving specific ir remote code - Broadlink RM4 Pro

I have a Broadlink RM4 Pro remote. I was wondering is there a way to trigger an action when the RM4 Pro receives a specific ir remote code.

My use case is that I have a learning remote that I want to use to trigger a set of actions when I press a specific button on my remote control (Sofabaton U1). The button is not assigned to anything specific such as controlling a TV. It’s a spare button.

I have learnt it in the Broadlink integration, I just can’t see how to get HA to respond to launch an automation or script when the ir code is received.

I don’t think you can use the integration for that.
But an ESP chip and a IR receiver is very cheap and will work just as you expect.
I have that to make my Yamaha remote a remote for the Chromecast and other things

Thanks so much. That sounds like a solution. I have a spare ESP32 board, so I will give it a go.