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

MyQ Open State Fix #16681

Merged
merged 3 commits into from
Sep 19, 2018
Merged

MyQ Open State Fix #16681

merged 3 commits into from
Sep 19, 2018

Conversation

geekofweek
Copy link
Contributor

@geekofweek geekofweek commented Sep 18, 2018

Fixes issues with MyQ reporting an open state

Description:

This resolves an issue with the last change to represent discrete status of the door position caused an issue with it reporting the door status as open. This is a break fix as any automation relying on the state of the cover to be open would fail.

Related issue (if applicable): fixes #16680 (and potentially #16783)

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

NA

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Fixes issues with MyQ reporting an open state
@ghost ghost added the in progress label Sep 18, 2018
@@ -11,7 +11,7 @@
from homeassistant.components.cover import (
CoverDevice, SUPPORT_CLOSE, SUPPORT_OPEN)
from homeassistant.const import (
CONF_PASSWORD, CONF_TYPE, CONF_USERNAME, STATE_CLOSED, STATE_CLOSING,
CONF_PASSWORD, CONF_TYPE, CONF_USERNAME, STATE_CLOSED, STATE_OPEN, STATE_CLOSING,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (85 > 79 characters)

Copy link
Contributor Author

@geekofweek geekofweek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix line too long

@geekofweek geekofweek changed the title MyQ Open State Fix WIP MyQ Open State Fix Sep 18, 2018
remove un-needed code
@geekofweek geekofweek changed the title WIP MyQ Open State Fix MyQ Open State Fix Sep 18, 2018
@balloob
Copy link
Member

balloob commented Sep 19, 2018

That's weird that that one was missing

@balloob balloob merged commit 60dfd68 into home-assistant:dev Sep 19, 2018
@ghost ghost removed the in progress label Sep 19, 2018
@balloob balloob mentioned this pull request Sep 28, 2018
Copy link

@talljohnson talljohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same error as others with STATE_OPENING while I was using 0.79.2.
Last fix in 0.79.3 resolved issue with the addition of STATE_OPEN. Simple fix.

UPDATE:

I responded too soon. After a few minutes, I get the same error still.

2018-10-05 17:22:10 ERROR (SyncWorker_1) [pymyq] MyQ - API Error[get_devices] 500 Server Error: Internal Server Error for url: https://myqexternal.myqdevice.com/api/v4/UserDeviceDetails/Get
2018-10-05 17:22:10 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 234, in async_update_ha_state
    state = self.state
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cover/__init__.py", line 231, in state
    if self.is_opening:
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cover/myq.py", line 109, in is_opening
    return MYQ_TO_HASS[self._status] == STATE_OPENING
KeyError: False

@geekofweek
Copy link
Contributor Author

@talljohnson slightly different problem, MyQ is now sending back a new state and giving 500 server errors on occasion.

See this issue:
#16885

@talljohnson
Copy link

@geekofweek thanks for the clarification. Switching threads.

@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed integration: myq small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MyQ 0.78 Issues
6 participants