The IP address and MAC are definitely correct, but when I call the broadlink.learn service with the data {"host": "10.0.2.140"} nothing happens except for the following message being printed in the log:
2019-07-30 22:18:54 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to device
Looking at the source code of the component, this message is printed when the auth call fails, but I have no idea why this would be.
I’ve already tried changing the type and timeout variables in the config, but nothing seems to make any difference. The device works fine via the IHC app (in so far as that app works fine for anything!).
I have given your JSON a try, but I get the same behavior. JSON is not whitespace sensitive (unlike YAML), so it should work with either and both are valid according to the built in validation in HASS.
Yes, the RM mini has a static DHCP lease assigned by my firewall/router.
I have the same problem after updating to 0.96.5 yesterday. On 0.94.x broadlink was working fine and today I noticed that it doesn’t work at all. Sending commands via IHC works fine though.
OK, so I’ve checked out the previous version of the python-broadlink library (0.10) and the CLI tools work there for both learning and sending commands, which wasn’t happening on version 0.11.1.
So this definitely looks like a bug in the new version. I’ll post a bug report and keep investigating further.
Everything looks exactly the same but for the fact I have a switch set up and am not using the timeout field. Have you tried taking this field out and putting in a dummy switch??
I have just tried calling the broadlink.learn service, with the exact syntax as listed by @VolkerKa and I got a notification of a new switch as I should do
That config was for my RM Pro Plus. However, I have plugged my RM Mini 3 in this morning and will try it out this evening to see what happens with that. Will update you later.
But I can’t seem to translate that to settings that work in Home Assistant. I can use broadlink.send in my scripts, so I’m not overly worried, but broadlink.learn` still eludes.