Convert songpal to use asynchronous websocket for state updates#19129
Merged
balloob merged 7 commits intohome-assistant:devfrom Dec 12, 2018
Merged
Convert songpal to use asynchronous websocket for state updates#19129balloob merged 7 commits intohome-assistant:devfrom
balloob merged 7 commits intohome-assistant:devfrom
Conversation
2 tasks
houndci-bot
reviewed
Dec 9, 2018
… this wouldn't matter for internals..)
…on file (required for setup.py)
MartinHjelmare
approved these changes
Dec 9, 2018
Member
MartinHjelmare
left a comment
There was a problem hiding this comment.
Looks good! Just two small comments.
| @property | ||
| def should_poll(self): | ||
| """Return True if the device should be polled.""" | ||
| return self._poll |
Member
There was a problem hiding this comment.
Should we keep the attribute?
Member
Author
There was a problem hiding this comment.
I'd prefer keeping it around for the time being, if someone comes up with a broken setup it makes it easy to check if the polling variant would work in that case.
| self._available = True | ||
|
|
||
| # activate notifications if wanted | ||
| if not self._poll: |
Member
There was a problem hiding this comment.
Can we remove this check?
Member
Author
There was a problem hiding this comment.
See above. If you think it's better to remove it, I'll do that.
Member
|
I think we can merge. |
dshokouhi
pushed a commit
to dshokouhi/home-assistant
that referenced
this pull request
Dec 25, 2018
…-assistant#19129) * Add websocket-based non-polling variant for songpal * linting fixes * changes based on Martin's feedback * Fix linting * add backoff timer for reconnects, fix variable naming (I thought that this wouldn't matter for internals..) * Remove poll configuration variable * bump the version just to be sure, the previous release lacked a version file (required for setup.py)
Merged
rytilahti
added a commit
to home-assistant/home-assistant.io
that referenced
this pull request
Jan 20, 2019
Songpal defaults to local push since home-assistant/core#19129 .
2 tasks
fabaff
pushed a commit
to home-assistant/home-assistant.io
that referenced
this pull request
Jan 20, 2019
Songpal defaults to local push since home-assistant/core#19129 .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR converts songpal platform to use the websocket interface for instantaneous updates on state changes.
Related issue (if applicable): fixes #
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: