Invalid config for [switch.broadlink]

after see this error

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

and reading the manual

old way


  - platform: broadlink
    mac: 'bla:bla:bla'
    switches:
      gas_heater:
        friendly_name: "Gas Heater"
        command_on: 'JgBIAAABKJYSExE5EhQRFBITEhMSExI4EhQSOBI4ExISFBE5ETkSExITEjkSExITEjgTEhEUEjkTNxEUEjgSORITEjgSOBMTEgANBQ=='
        command_off: 'JgBIAAABKZUTEhI5EhMSExITERQSExI5EhMSOBM3ExMRFBI4EjgSExE6EhMSOBE5EhMSFBITEjgSExI5ERQSExI4EjgSOREUEgANBQ=='

new way

  - platform: broadlink
    mac: 'bla:bla:bla'
    switches:
      - name: "Gas Heater"
        command_on: 'JgBIAAABKJYSExE5EhQRFBITEhMSExI4EhQSOBI4ExISFBE5ETkSExITEjkSExITEjgTEhEUEjkTNxEUEjgSORITEjgSOBMTEgANBQ=='
        command_off: 'JgBIAAABKZUTEhI5EhMSExITERQSExI5EhMSOBM3ExMRFBI4EjgSExE6EhMSOBE5EhMSFBITEjgSExI5ERQSExI4EjgSOREUEgANBQ=='

new way look heap cleaner

thanks guys

1 Like

I did so.
however error when using Switch

ā€œEntity not available: Switch. ***ā€

Same hereā€¦
no way to reboot

This config works for me, new (- name) syntax with lowercase name

- platform: broadlink
  mac: 'blablabla'
  switches:
    - name: tv_onoff
      command_on: JgBYAA...
      command_off: JgBQAA...

I fixed it

How do you fixed it?

Iā€™m struggling very hard with this issue and my eyes are spitting blood bc of staring at the screen.

Iā€™m really a newbie and for my head itā€™s very strange, bc send.command ā€œpowerā€ (developerā€“>services UI) works perfectly fine. But when check configuration.yaml before restarting in my case HA says this:

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

Iā€™ve check the names of codes stored in ā€œ.storage/broadlink_remote_XXXXXXXXXXX_codesā€ and itā€™s there

I canā€™t understand that. Iā€™ve tried to change the name power to command_on (as on the documentation example), then the error jumps to next command name ā€œpower_Rā€ā€¦ Itā€™s a remote of an electric radiator soā€¦ power to command_on I could be used to itā€¦ but power_R refers to the power of the resistanceā€¦and after these I have timer, temp+, temp- and fanā€¦ all of them in the codes.

Is there a list of limited options? I canā€™t found in broadlink documentation.

Thanks in advance

Show us you code so far remember to format correctly

U just need to put the it code for off/on

Ha will do the rest

1 Like

Hi, myle letā€™s see if I can paste the code correctlyā€¦
This is in my configuration.yaml

#Broadlink Remote
remote:
  - platform: broadlink
    host: 192.168.1.73
    mac: XX:XX:XX:XX:XX:XX
    name: RM pro+
#Estufa mando
#Estufa mando
switch:
  - platform: broadlink
    mac: XX:XX:XX:XX:XX:XX
    switches:
      - name: Estufa mando #Also I've tried estufa_mando
        power: Big Chunk of Code for power
        power_R: BCoC for power_R
        temp+: BCoC for temp+
        temp-: BCoC for temp-
        timer: BCoC for timer
        fan: BCoC for fan

then, in the .storage/broadlink_remote_XXXXXXXXXXX_codes:

"estufa_mando": {
      "power": "BCoC for power",
      "power_R": "BCoC for power_R",
      "temp+": "BCoC for temp+",
      "temp-": "BCoC for temp-",
      "fan": "BCoC for fan"
    }

And just to remember, all codes work perfectly through remote.send > broadlink>ā€œcommand nameā€ Iā€™ve got even a multibutton card with all the options, even some ā€œā€""ā€œmore advancedā€""" options by choosing differents repetitions of remote.send services to choose with one click the temperature + power_R + timerā€¦etc with one single click

What do you mean I only need to put code for ON/OFF?.. Itā€™s the same code for on and for off, itā€™s a very simple remoteā€¦and the other options?? This I canā€™t understandā€¦

Thanks againā€¦ I supose itā€™s something as stupid as crucial, but my brain isnā€™t coded for codingā€¦

NO WAY!!! I think Iā€™ve found the problemā€¦ by typing here and looking everything and a good sleep the night before, of courseā€¦I think my mind has enlightened itselfā€¦
Just moved everything from ā€˜switch:ā€™ to ā€˜fan: BCoC for fanā€™ under the hierarchy ā€œremote:ā€ā€¦ I mean, it was a problem of formatā€¦like myle suggestedā€¦as I said ā€œas stupid as crucialā€

Of courseā€¦ā€˜switch:ā€™ was not under ā€˜remote:ā€™ hierarchyā€¦it was another Āædomain? Hereā€™s the code that allows me to pass the yaml check.

#Broadlink Remote
remote:
  - platform: broadlink
    host: 192.168.1.73
    mac: XX:XX:XX:XX:XX:XX
    name: RM pro+
#Estufa Mando
    switches:
      - name: Estufa mando
        power: BCoC for power
        power_R: BCoC for power_R
        temp+: BCoC for temp+
        temp-: BCoC for temp-
        timer: BCoC for timer
        fan: BCoC for fan

Thanks for everything

10 out 10 for code formatiing

Where did you get the power: Bcoc for power

My understanding is could u replace the power: with command_on: bcoco for power

Do the right caps thing

If you look at first post the setting look different

Donā€™t know where you got those command from

doing on phone in hospital sorry for bad English and formatting

1 Like

Hello myle. Donā€™t worry about format.

Sorry just, to make a shortcut BCoC is my acronym for Big Chunk of Code that I just used this time. Because the codes are insanely longā€¦so to make things short and more easy readable.

As I said in my last post, I just found the error, it was a problem of misunderstanding how to add the field ā€˜switch:ā€™. I thought it was another Āædomain? like ā€˜remote:ā€™ and it was missplaced, just add som tab spacing to get ā€˜switch:ā€™ under ā€˜remote:ā€™ hierarchy and HA yaml check was OK.

Thanks again!

Yeap the bloody spacing think it took me about 3 months get my head around it?

1 Like