Hello, I have Home assistant version 2022.2.3. I am using Broadlink RM pro to control RF fan and some broadlink mini to control TV and air conditioner. Since a few days when I try to reset my home assistant to update a version I get an error message when I press “check configuration”:
Invalid config for [switch.broadlink]: [fan_speed_1] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->fan_speed_1. (See ?, line ?).
Invalid config for [switch.broadlink]: [fan_speed_2] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->fan_speed_2. (See ?, line ?).
Invalid config for [switch.broadlink]: [fan_speed_3] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->fan_speed_3. (See ?, line ?).
Invalid config for [switch.broadlink]: [fan_speed_4] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->fan_speed_4. (See ?, line ?).
Invalid config for [switch.broadlink]: [fan_speed_5] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->fan_speed_5. (See ?, line ?).
Invalid config for [switch.broadlink]: [fan_speed_6] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->fan_speed_6. (See ?, line ?).
Invalid config for [switch.broadlink]: [direction_1] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->direction_1. (See ?, line ?).
Invalid config for [switch.broadlink]: [direction_2] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->direction_2. (See ?, line ?).
Invalid config for [switch.broadlink]: [light_1] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->light_1. (See ?, line ?).
Invalid config for [switch.broadlink]: [light_2] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->light_2. (See ?, line ?).
Invalid config for [switch.broadlink]: [turn_off_fan] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->turn_off_fan. (See ?, line ?).
Invalid config for [switch.broadlink]: [power_on] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->power_on. (See ?, line ?).
Invalid config for [switch.broadlink]: [roomba] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->roomba. (See ?, line ?).
Invalid config for [switch.broadlink]: [roomba] is an invalid option for [switch.broadlink]. Check: switch.broadlink->switches->0->roomba. (See ?, line ?).
I did read the breaking changes and removed all my yaml entries for my broadlink switches which removed all the error codes when I “check configeration” but even though the broadlink devices are still showing in my integrations none of the switches are available?
Thanks for that but could you please let me know the following as I tried your way and it’s not working for me.
1- Is that in your configuration.yaml or switch.yaml file?
2- Do you still need add the command name as in your example it would have been philips_tv_on
3- Did you mean to leave all the " " of bothe the name and the commands.
4- Lastly, where did you find this solution, could you please post the link?
Sorry if these sound like nooby questions but that’s because I am.
If you have an include for a switch.yaml in your configuration.yaml, then you need it in your switch.yaml .
In any case, put it under your “switch” hierarchy.
Yes, you need to provide a name, so the entity has a name. Note: not a friendly_name.
In my config, I have only the commands within single quotes. The name has no quotes. The example provided by the docs I linked do not have any quotes. That Philips example ALSO works for me. So to my knowledge, it makes no difference for these kinds of commands, whether you put quotes around it or not.
Thanks again Ben and it’s much appreciated but i still can’t get it to work as the config check passes but I cannot see the switch in Dev Tools.
Would you be so kind as to cut and paste your whole switch entry please
platform: broadlink
mac: ‘a0:43:b0:53:f6:76’
switches:
-name: LG TV Power
command_on: JgBYAAABIZMSExETEjcSExISEhMRExITEjcSNxEUETgSNxI3EjcSNxISEhMSEhI3EhMSExETERQROBI3EjcSEhI3EjcSNxI4EgAFEgABJEsSAAw0AAEkShIADQUAAAAAAAAAAAAAAAAAAA==
command_off: JgBYAAABIZMSExETEjcSExISEhMRExITEjcSNxEUETgSNxI3EjcSNxISEhMSEhI3EhMSExETERQROBI3EjcSEhI3EjcSNxI4EgAFEgABJEsSAAw0AAEkShIADQUAAAAAAAAAAAAAAAAAAA==
I think the problem is one of the things Ben pointed out above but I’m not sure which “switch” reference i should take out the one in my configuration.yaml as below which points to a directory of switches which has the entry as above. I hope that makes sense.
Ben, if you’re there and not completely fed up of me, please help! I’ve now # out the switch: !include_dir_list switches/ and put your code with my mac address directly into the configuration.yaml and it is passing the Config Check but I still cannot see the switches when trying to use in Lovelace or in Dev Tools. Do I need to do anything else to mak them visible? It is now also passing with my switches but I am using yours just to try and make it easier to debug as it is working for you.