How can I get HA learn Broadlink RM4 IR and RF codes

I have a Broadlink RM4 integrated to Home Assistant Core 2022.6.7 on top of Home Assistant Operating System 8.2.
The RM4 have been working fine outside of HA and now that I have it integrated, I am trying to make HA learn the codes for the gas heater and fans.
I know this has been raised many times before and I have searched for many hours with no working solution.
From what I have read, the current process is to use the remote.learn_command so this is what I have tried to do.
I click on Call Service, point the remote to the RM4 (yellow light is on) and press the remote ‘On’ and light goes out. But I see nothing coming back to HA, no pop-ups with codes or anything.
I don’t see anything that relates to this in the logs.

Can anyone point me in the right direction please? As you can probably see, I am a total newbie on HA so I apologise for any silly questions, I am trying to learn as best I can.

This is what the remote.learn_command script looks like:

service: remote.learn_command
data:
  device: gas heater
  command: turn on
  command_type: ir
  timeout: 5
target:
  area_id: lounge_room
  device_id: fa1609b666fbb83d2dd544a5521bda3e
  entity_id: remote.wi_fi_universal_remote_remote

Take a look at this setting

Thank you, I will try it and report back.

I have to ask a question; if I put the script inside configuration yaml (as shown in the documentation) , how can I run the script? I restarted HA thinking that would run the script but no light came on on the RM4.

Finally got it to work!
It is all in the instructions you posted. I missed the bit about the Notifications and where the file is stored.

Thanks heaps!