Broadlink RM4 Pro in automations - one of the strangest issues I've seen

Recently picked up a Broadlink RM4 Pro to control a ceiling fan with HA. I was able to learn commands from my remote, and send those commands through HA. I then set up an automation to use the buttons on a Lutron Pico remote to trigger those commands as I have in the past for other devices in my house.

I noticed that after setting up the automation that nothing was working from the Pico. Testing the actions manually through dev tools works perfectly, as well as some buttons on my dashboard that trigger the same actions. I tried going into my automation and running the action manually and it works. Adding an additional action to the same trigger in my automation (toggling a light) works. I also noticed that the light on the RM4 blinks when being triggered by the automation just as it does when triggering it any other way, but nothing happens with my fan.

I found an old issue in Github that seems to be related: #30105. The suggestion was to wrap the command in quotes which I tried and it didn’t work. I’ve opened an issue in case it is related to the integration: #131755

Really lost on this one as the remote.send_command actions work perfectly as long as they aren’t being triggered by an automation.

Here’s my automation YAML for reference:

alias: Luke's Room
description: ""
triggers:
  - device_id: 4e7d53cc1a34da50ce11682de4885520
    domain: lutron_caseta
    type: press
    subtype: "on"
    id: on button
    trigger: device
  - device_id: 4e7d53cc1a34da50ce11682de4885520
    domain: lutron_caseta
    type: press
    subtype: "off"
    id: off button
    trigger: device
  - device_id: 4e7d53cc1a34da50ce11682de4885520
    domain: lutron_caseta
    type: press
    subtype: raise
    id: up button
    trigger: device
  - device_id: 4e7d53cc1a34da50ce11682de4885520
    domain: lutron_caseta
    type: press
    subtype: lower
    id: down button
    trigger: device
  - device_id: 4e7d53cc1a34da50ce11682de4885520
    domain: lutron_caseta
    type: press
    subtype: stop
    id: favorite button
    trigger: device
conditions: []
actions:
  - if:
      - condition: trigger
        id:
          - on button
    then:
      - action: remote.send_command
        metadata: {}
        data:
          device: lukes_room_fan
          command: light_toggle
        target:
          entity_id: remote.luke_s_room_ceiling_fan
mode: single

A shot in the dark… You are using “on” and “off” triggers, but the action is “toggle”. Could it all be getting out of sync somehow?

Shouldn’t be an issue. The triggers all have id and are set up to mirror the buttons on the Pico. The fan itself doesn’t have exclusive on and off buttons for the light, just a toggle. None of the commands work in an automation though, I’ve just been testing with light_toggle for now to keep things simple.

When you test your automation in the dev tools template tab it will skip the trigger part of it.
That means you probably have no test of the triggers and that is where the problem is.
To trigger the automations and test the triggers you have to use the states tab i Athen dev tools, then find and select a sensor used in the triggers and the set the state for it manually.
It will revert back at next update and then trigger the automation.

Triggers are definitely working. I mentioned in the post that I added a second action in that automation YAML above that toggles another light in the house, and that is getting triggered successfully with the button. I can also see the light on the RM4 blinking when pressing the button on the Pico.

So this is getting even more confusing. It seems to be isolated to Pico remotes. Here’s what I’ve tested:

  1. Setting another trigger, such as the state of another light going from off to on, is able to successfully trigger the action remote.send_command.
  2. Setting a different action for the Pico remote to trigger works, for example toggling a light.
  3. I have other Pico remotes in other rooms that are controlling devices. Setting one of them to trigger remote.send_command doesn’t work.

Try to add a delay of 5 seconds before the command.
The devices might not be able to distinguish the remote signal to the receiver from the broad link signal to the ceiling fan.
Remember that RF signals are always a shared medium.

It sounds like you are having the same problem I did almost 5 years ago. Try @WallyR’s suggestion. If your problem is same as mine, then 300ms delay is enough.

In summary, the Pico sends the command that triggers the Broadlink but the Pico is still sending information while the Broadlink starts sending command to fan and there is interference. My trouble was with a Pico and a Bond device. If you want to read about my ordeal, it’s here:

I posted on Bond’s forum too that ultimately found solution. It’s a shorter read.

That did it! I didn’t realize the Pico is also sending RF. I landed on 590ms and everything is working perfectly. Thanks @WallyR @Stephenn !

I never saw any other mention of this issue back in 2020 nor any time since but glad the problem is solved.

It is only because both devices are using RF on the same frequency and the devices are fast enough to receiver and transmit, so they can actually overlap.