Can't set up more than one Broadlink IR blaster with custom switches

Hi All!

I’m running into an issue trying to set up some custom switches as per the current documentation for Broadlink IR blasters (I have 2 of the RM4 minis). I’m not sure if I am hitting a broadlink platform limitation here or what, but I can’t seem to set up separate custom switches for the two IR blasters. I have checked my yaml multiple times over, and it looks correct to me, but I’m hoping someone can look at this and tell me what might be going wrong. When I check the config from the Home Assistant GUI, I get the following error:

Invalid config for [switch.broadlink]: [comand_on] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->comand_on. (See ?, line ?).

Here is my switch.yaml:

  - platform: wake_on_lan
    mac: blah
  - platform: broadlink
    mac: blah
      - name: TaoTronics Tower Fan
        command_on: blah
        command_off: blah
      - name: Hisense AC
        command_on: blah
        command_off: blah
  - platform: broadlink
    mac: blah
      - name: TaoTronics Tower Fan 2
        comand_on: blah

If I comment out the last 5 lines, I get no errors

How did you set up the Broadlink initially? As I remember, you have to do a separate integration for each RM4.

1 Like

Same question. Do you have two separate integrations set up? It must look like this on the integrations page:


Yes, here is a screenshot of my Broadlink integration.

EDIT: I am also noticing that when I do comment those last 5 lines out, the broadlink switches for the fan and AC do not show up anywhere in Home Assistant (no Entities or anything)

Not sure what changed or if I was just being dumb, but I do see the entities for the first set of switches (contrary to above)

Hm. This works for me:

# IR commands ------------------------------------------------------------------  
  - platform: broadlink
    mac: 24dfa7e87063
      - name: counter_lights

  - platform: broadlink
    mac: a043b046aa17
      - name: tv_standby

Are you sure both your mac addresses are right (and different!)?

Yeah, this is pretty bizarre. I am positive that both mac addresses are correct and unique to each device.

For what it is worth, I am running the latest version of Home Assistant Core (2022.8.7)

Do both RM4s work if you use remote.send_command rather than the switch?

They sure do

Starting to wonder if I’ve stumbled across a bug of sorts

What does the wake_on_lan bit do in your yaml? That seems to be the only difference between yours and mine.

Good question. I did try removing that, but still get the same error message. To answer your question though, the wake_on_lan bit is a switch to wake up my gaming PC so I don’t have to get my lazy butt off the couch :slight_smile:

Ohhhkay, finally just made some progress. I believe the issue was some bad YAML formatting somewhere. Since the first set of broadlink switches work, I decided to copy those lines and replaced the ones that didn’t work with those working lines (and just changed the mac address to the desired device). Instantly got the green “Configuration valid!” after that. I swear YAML drives me nuts sometimes…

Next question: Am I the only one around here who hates YAML for this very reason? Oh well, at least it wasn’t a bug!