Your RM4 Pro will not work with HA if it is linked to the Broadlink app. You need to do a factory reset, then go just far enough through the setup process with the app to get an IP address. After that you can close the app and set it up using the HA integration. It’s not supposed to be necessary, but I’ve found it a good idea to give the RM4 Pro a reserved IP address on your router.
After that you can follow the remote.learn_command instructions in the docs (IR is different from RF). Bear in mind that some codes will be the same (although they’re so long it can be hard to tell). There’s good explanation here:
a good idea to give the RM4 Pro a reserved IP address on your router.
Absolutely! Otherwise on any lease expriing or a router reboot you will be deleting and readding the Broadlink as I have done probably 50 times now this year.
That is because … if you are like a poor, stupid soul like me and own a Starlink whose router is such garbage that you cannot reserve addresses nor even change it from 192.168.1.X.you cannot give it a fixed IP address.
It should not be this way. Alexa for example may change IP addresses but the integration works. You can always feel free to chime in here and myabe one day the code owner will fix it.