The Broadlink app configuration is independent to the HA integration, so devices learned in the app are of no use in HA AFAIK.
I setup two Broadlink RM mini 3s recently to control two ceiling fans, and did the following:
- Configured them to connect to my network using Broadlink Manager
- Assigned reserved IPs from my router.
- Firewalled the IPs from the internet (except for NTP traffic).
- Added both remotes in HA:
remote:
- platform: broadlink
host: 192.168.1.238
mac: 24:df:a7:d6:12:f2
type: rm_mini3_newblackbean
name: "Living Room"
- platform: broadlink
host: 192.168.1.239
mac: 24:df:a7:d6:11:4d
type: rm_mini3_newblackbean
name: "Bedroom"
- used the remote.learn_command service in Developer Tools > Service for each remote to learn the commands from the fan remote (these commands are saved as a file named broadlink_remote__codes under config/.storage folder.
- wrote scripts to send named commands eg:
# reverse the current direction of the fan.
living_room_fan_reverse:
alias: "Living room fan reverse"
mode: single
sequence:
- service: remote.send_command
data:
entity_id: remote.living_room
device: fan
command: "Reverse"
I’d encourage you to look at the Broadlink Manager thread I linked above - it’s lengthy but covers a wide discussion on how to best integrate. I went with a hybrid approach avoiding use of the app with the Broadlink Manager application but learning the codes through HA and I’m happy with the results.