arraylabs / pymyq

Python wrapper for MyQ API
MIT License
112 stars 42 forks source link

Close operation no longer working via Google Assistant #56

Closed mekenthompson closed 3 years ago

mekenthompson commented 3 years ago
dseven commented 3 years ago

If it's working in Home Assistant, it's probably not a pymyq issue. Suggest exploring issues in whatever you're using to integrate Google Assistant with Home Assistant.

zackmoss commented 3 years ago

Here is the error inside of Home Assistant which is linking back to the pymyq api.py file.

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/myq/config_flow.py", line 50, in async_step_user info = await validate_input(self.hass, user_input) File "/usr/src/homeassistant/homeassistant/components/myq/config_flow.py", line 30, in validate_input await pymyq.login(data[CONF_USERNAME], data[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

If there needs to be any more testing please let me know and I will be happy to. I would love to see this working properly again.

dseven commented 3 years ago

That's fixed in pymyq 2.0.12. It will be picked up by the next release of home assistant.

mekenthompson commented 3 years ago

Seems 2.0.12 hasn't resolved this. I'm using Nabu Casa to integrate HASS to GA, and Google control of other "covers" such as my curtains works fine.

dseven commented 3 years ago

2.0.12 addresses the problem that @zackmoss described. Your (@mekenthompson) issue is something different....

ehendrix23 commented 3 years ago

Closing this issue. Seems more like to be an issue more related to HASS integration with Google or how it is setup within HASS and not related to pymyq. Please open a new issue if it does not work directly from HASS and errors in log are shown from pymyq.