I’ve just got my first Broadlink device, the RM Mini 3 and wanted to add a couple of remotes, so I followed a tutorial on youtube where he sets up a switch.yaml for his remote. I did this for my Moretti Tower Fan however found that when I added a button I had to push it twice each time (toggle button) for it to send a signal. I got around this eventually by putting the code in twice.
It’s just that the integration and GUI editing have moved on quite a bit since then, making the video over-complicated. The section about learning commands with Developer Tools is fine, but you no longer have to use .yaml to set up the broadlink device nor do you have to copy codes from the .storage file.
Once HA has learned the Broadlink commands in Developer Tools, using them in automations/scripts is very straightforward:
Or you can create switches as @vlad suggests. An alternative to switches is input_booleans, with short automations to toggle the Broadlink-controlled device on and off when the “helper” changes state.