I have a Logitech Z906 system at my desk that I control with a Klikr from my phone. But since its battery has the habit of running out when I use it - I don’t actually use it that often - I felt to replace it with something that is plugged into power. And besides, Android likes to complain the Klikr app uses an outdated Bluetooth API, which is also why the app was removed from the store and can only be installed from the manufacturer’s website. So even more reason to look for an alternative.
What caught my eye was the Broadlink RM4 Mini, and because I saw Home Assistant has an integration that supports it I bought one. I was a little disappointed when I saw the device configured in the app didn’t get carried over into Home Assistant like I know from other integrations (IKEA & Hue), but I guess the little device (compared to the Klikr it’s actually quite chunky) doesn’t actually store the configured devices, they’re only known in the app…
So following the documentation I wanted to create a script to learn the codes:
However, trying to execute the script I get the error message
If I recall correctly, at some point I read in the changelogs that some namespaces were moved around, and I also found other topics that say that for an apparently similar Xiaomi device the service name is i.e. xiaomi_miio.remote_learn_command so I tried wi_fi_remote_remote.remote_learn_command or broadcom.remote_learn_command in the service panel but neither seem to exist.
I also can’t seem to find any remote related service if I search in the service panel:
Haven’t test the scripts, but you can do it one at the time through the service.
The codes are stored in the config/.storage/ (hidden folder) and in a file like Broadlink_remote_xxxxxxxxxx_codes
I had tried that before, yes. But I just removed it again anyways, restarted Home Assistant and then readded it. Now it works. Thanks .
Now I just got to figure out how the states for the universal media player work. After all I’m not getting any feedback whether the device is turned on or off…
got similar problem but my error message is:
Failed to call service remote.learn_command. Expecting property name enclosed in double quotes: line 17 column 9 (char 7040)
@guymaurier Thank you very much for your reply. However, it does not work. Doing the yaml at Services or Script has the exact same error, as attached. It is so frustrating there is no support for this…
Sorry to revive this, but I ran into the same issue.
Turns out I had a comma in the file after the very last command because I was copy-pasting things around. Removed the unnecessary comma and it works. That’s probably why deleting the codes config file worked for you.