New Broadlink RM4 Pro and Home Assistant Button
Just got this today and I thought it would be simple and straightforward to add it Home Assistant and allow me to control my 10 year old RF Switches from a simple button.
Three hours later and I finally have a working (but ugly) button that works with just a click.
In the time setting it up I have looked at a few threads in here and watched a few linked videos, but nothing seemed to have the whole answer and some were old. So I figured I would upload this here in the hope that it might help someone else click when they are trying to get one working.
Getting the device into Home Assistant was pretty straight forward:
- Add the device to your wifi
- Then in ‘Devices & Services’, add the Broadlink Integration and configure it with the IP address.
Then the fun bit starts:
Adding codes to Home Assistant using Developer Tools
NOTE - All names are case sensitive
(Seemed to need to add the Broadlink as both an Entity and a Device)
When you are clicking the remote button to get the system to recognize the signal it appears to be doing nothing until suddenly the light goes off. At that point stop pressing the button and wait for the orange light to come back on, then the next press should result in a green tick appearing over the ‘Call Service’ button for a second.
(This appears to be confirming that the button it has learnt is actually the right one)
Testing the button is learnt is simple, just change the Service to ‘Remote: Send Command’.
Getting a Button on Dashboard
I am not sure this is the right way, so I am sure someone will be along to improve it, but this worked.
I created a ‘Helper’ toggle item
And then two Scripts
First, turn on lights and set the helper state to ON
And then do the same for turning the lights OFF and the helper state to OFF
I then made a third script to toggle the lights on/off
This was done using ‘+ Add Building Block’ and selecting ‘Choose’
So if the Helper is showing as ON, run the script to turn the lights OFF etc.
Nearly done, now add a button
It’s not pretty, but it works, and hopefully will help others get it working.