MyQ Integration Erroring

The python code in the integration has started throwing an error, and the integration is no longer working.

The username and password had not changed, as my MyQ app is still working fine on my phone.

I am running Home Assistant OS 5.8 on a Raspberry Pi 4b

From the home assistant core logs:

2020-12-24 20:36:12 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [email protected] for myq
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/myq/__init__.py", line 36, in async_setup_entry
    myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession)
  File "/usr/local/lib/python3.8/site-packages/pymyq/api.py", line 259, in login
    await api.authenticate(username, password, False)
  File "/usr/local/lib/python3.8/site-packages/pymyq/api.py", line 170, in authenticate
    auth_resp = await self.request(
  File "/usr/local/lib/python3.8/site-packages/pymyq/api.py", line 151, in request
    return await self._send_request(
  File "/usr/local/lib/python3.8/site-packages/pymyq/api.py", line 114, in _send_request
    message = f"Error requesting data from {url}: {data.get('description', str(err))}"
UnboundLocalError: local variable 'err' referenced before assignment
1 Like

Search results for ‘myq not working’ - Home Assistant Community (home-assistant.io)

1 Like

Do you just have that saved in your clipboard so you can past it several times a day?

I’m tempted to set up a keyboard macro…

It would be be more constructive if a solution was offered rather than telling me to search for solutions that dont exist.

The solution does exist, I for one am using it.
The very annoying thing is that this EXACT same question is asked several times a day because few actually search.

If you read through the search results, you’ll find the temporary solution which GlennHA & I are using. You’ll also find that the HA folks are aware of the problem and working on a solution that doesn’t require you to follow a set of instructions.
Armed with that information, you could then decide whether you want to brave command-line file editing or wait for the more automatic solution. That last sentence is exactly what I had in mind when I put the search link up in the post.
I’ll admit one other ulterior motive: As a user very interested in having my garage door operation as part of HA, I end up reading every one of these threads to see if someone’s come up with a new and better solution. By pointing people to the original threads, I can be more certain that any new ideas and the eventual automatic solution will be posted there.

For the record I am using Hass OS on a Pi, it isnt possible to use the proposed CLI/docker based workarounds.

Either way, the bloke who makes the Python code has fixed the issue: https://github.com/arraylabs/pymyq/issues/56