Load/unload geofency entities correctly between component and platform#20497
Merged
rohankapoorcom merged 3 commits intoJan 27, 2019
Conversation
houndci-bot
reviewed
Jan 27, 2019
| """Unload a config entry.""" | ||
| hass.components.webhook.async_unregister(entry.data[CONF_WEBHOOK_ID]) | ||
|
|
||
| hass.async_create_task( |
Member
There was a problem hiding this comment.
We can await the coroutine directly. We don't need to create a task.
Member
Author
There was a problem hiding this comment.
Isn't better practice to create a task so that we don't block this thread? Or does it not matter since all we're doing is registering with the dispatcher?
Member
There was a problem hiding this comment.
There is no risk of deadlock when using this method.
MartinHjelmare
approved these changes
Jan 27, 2019
Member
MartinHjelmare
left a comment
There was a problem hiding this comment.
Nice! Can be merged when build passes.
fredrike
pushed a commit
to fredrike/home-assistant
that referenced
this pull request
Jan 30, 2019
home-assistant#20497) * Load/unload geofency entities correctly between component and platform * Lint * Await the coroutine directly
Merged
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:
Relates to #20237. Like #20448 but for geofency.
This came out of a couple of discussions with @MartinHjelmare #20083 (comment) and #20079 (comment).
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Checklist:
tox. Your PR cannot be merged unless tests passIf the code does not interact with devices: