-
-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Centralize wemo exception handling #46705
Merged
Merged
Conversation
This file contains 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
MartinHjelmare
approved these changes
Feb 17, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
williamobrien
added a commit
to williamobrien/core
that referenced
this pull request
Feb 18, 2021
* Update zha to use new fan entity model (home-assistant#45758) * Update zha to use new fan entity model * fixes * tweaks for zha * pylint * augment test cover * Centralize wemo exception handling (home-assistant#46705) * Perform wemo state update quickly after a timeout (home-assistant#46702) * Perform state update quickly after a timeout * with async_timeout.timeout(...) -> async with async_timeout.timeout(...) * [ci skip] Translation update * Bump pylutron 0.2.7 (home-assistant#46717) * Switch ssdp to be async by using async_upnp_client for scanning (home-assistant#46554) SSDP scans no longer runs in the executor This is an interim step that converts the async_upnp_client response to netdisco's object to ensure fully backwards compatibility * Add selectors to Input * service definitions (home-assistant#46652) * Add selectors to Alert service definitions (home-assistant#46627) * Add selectors to Camera service definitions (home-assistant#46630) * Add selectors to Switch service definitions (home-assistant#46635) * Add selectors to Downloader service definitions (home-assistant#46638) * Add selectors to Fan service definitions (home-assistant#46639) * Add selectors to Cover service definitions (home-assistant#46634) Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com> * Add selectors to Automation service definitions (home-assistant#46629) * Add selectors to Climate service definitions (home-assistant#46632) * Add selectors to Alarm Control Panel service definitions (home-assistant#46626) * Upgrade and constrain httplib2>=0.19.0 (home-assistant#46725) * ubus: switch to pypi library (home-assistant#46690) Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> * Add selectors to Counter service definitions (home-assistant#46633) * Add advanced service parameter flag (home-assistant#46727) * Add discontinuity support to HLS streams and fix nest expiring stream urls (home-assistant#46683) * Support HLS stream discontinuity. * Clarify discontinuity comments * Signal a stream discontinuity on restart due to stream error * Apply suggestions from code review Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com> * Simplify stream discontinuity logic * Add selectors to Scene service definitions (home-assistant#46729) * Fix missing color switch specific device class for Z-Wave JS driver >6.3 (home-assistant#46718) * Add selectors to Netatmo services (home-assistant#46574) * Add selectors * Fix schedul selector * Update homeassistant/components/netatmo/services.yaml Co-authored-by: Bram Kragten <mail@bramkragten.nl> * Update homeassistant/components/netatmo/services.yaml Co-authored-by: Bram Kragten <mail@bramkragten.nl> * Update services.yaml * Added required field Co-authored-by: Bram Kragten <mail@bramkragten.nl> * Add test for biannually cycle in utility_meter component Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Eric Severance <esev@esev.com> Co-authored-by: HomeAssistant Azure <hello@home-assistant.io> Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com> Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com> Co-authored-by: Álvaro Fernández Rojas <noltari@gmail.com> Co-authored-by: Allen Porter <allen@thebends.org> Co-authored-by: Jesse Campbell <hikeit@gmail.com> Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Proposed change
There are a few common steps that happen, to set
self._available
, during exception handling for calls to pywemo. The same boilerplate is copied several times across the platform code. This PR centralizes that logic inside the baseWemoEntity
class. After this PR all updates toself._available
are encapsulated within the base class.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: