Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadlink integration broke with update "Error setting up entry for broadlink" #45178

Closed
simontb opened this issue Jan 15, 2021 · 7 comments
Closed

Comments

@simontb
Copy link

simontb commented Jan 15, 2021

The problem

After I updated HA from 2021.1.1 to 2021.1.2, my broadlink remote stopped working. When I want to send a command I get this error: "Unable to find service remote.send_command".

I had a look at the logs and it seems the remote isn't even set-up after starting. See log entry below.

Environment

  • Home Assistant Core release with the issue: 2021.1.2
  • Last working Home Assistant Core release (if known): 2021.1.1
  • Operating environment (OS/Container/Supervised/Core): Home Assistant OS
  • Integration causing this issue: Broadlink
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/broadlink/

Traceback/Error logs

Logger: homeassistant.config_entries
Source: components/broadlink/updater.py:24
First occurred: 9:43:30 (1 occurrences)
Last logged: 9:43:30

Error setting up entry Fernbedienung Wohnzimmer for broadlink
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 25, in async_setup_entry
    return await device.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 97, in async_setup
    update_manager = get_update_manager(self)
  File "/usr/src/homeassistant/homeassistant/components/broadlink/updater.py", line 24, in get_update_manager
    if device.api.model.startswith("RM mini"):
AttributeError: 'NoneType' object has no attribute 'startswith'

Additional information

I use the RM4C Mini (0x653c) and thus had to update the broadlink lib manually according to this workaround: #42983 (comment) . I tried updating broadlink again, but this didn't solve my issue.

@probot-home-assistant
Copy link

broadlink documentation
broadlink source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @Danielhiversen, @felipediel, mind taking a look at this issue as its been labeled with an integration (broadlink) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@felipediel
Copy link
Contributor

You need to patch the module again after the update. This error is happening because you added the device before and the PID no longer exists.

@simontb
Copy link
Author

simontb commented Jan 15, 2021

Thanks @felipediel

My mistake was to patch with patch-23 and not master. Now it works again :)

Btw: any estimate, when the updated lib will become part of HA-core?

@simontb simontb closed this as completed Jan 15, 2021
@felipediel
Copy link
Contributor

Thanks for reporting back! It's already merged, I hope it will be released soon.

@maeneak
Copy link

maeneak commented Jan 21, 2021

I cannot update the broadlink module to 0.16.1 using the below method anymore after updating to core-2021.1.4.

docker exec -it homeassistant /bin/bash
pip3 install --upgrade git+https://github.com/mjg59/python-broadlink.git --no-deps

After restarting HA the module reverts back to 0.16.0.

@maeneak
Copy link

maeneak commented Feb 6, 2021

This method is still working. The master branch includes the updates but the release 0.16.1 has been removed so re-installing python-broadlink using the method above does fix the problem. Any updates on a new official release of python-broadlink to include in a HA-Core update @felipediel?

@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants