Load/unload locative entities correctly between component and platform#20498
Merged
Conversation
| """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.
MartinHjelmare
approved these changes
Jan 27, 2019
MartinHjelmare
requested changes
Jan 27, 2019
| hass.components.webhook.async_register( | ||
| DOMAIN, 'Locative', entry.data[CONF_WEBHOOK_ID], handle_webhook) | ||
|
|
||
| await hass.config_entries.async_forward_entry_setup(entry, DEVICE_TRACKER) |
Member
There was a problem hiding this comment.
Sorry, wrong line was changed.
Member
There was a problem hiding this comment.
Here we should use create task.
Member
Author
|
Doing too many things at once, should be the correct coroutine awaited this time. Thanks for catching. |
Member
|
Can be merged when build passes. |
fredrike
pushed a commit
to fredrike/home-assistant
that referenced
this pull request
Jan 30, 2019
home-assistant#20498) * Embed device_tracker in locative * Load/unload locative entities correctly between component and platform * Await the coroutine directly * Await the correct coroutine
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 locative.
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: