Skip to content

Fix race during initial Sonos group construction#26371

Merged
pvizeli merged 2 commits into
home-assistant:devfrom
amelchio:sonos-first-group-race
Sep 3, 2019
Merged

Fix race during initial Sonos group construction#26371
pvizeli merged 2 commits into
home-assistant:devfrom
amelchio:sonos-first-group-race

Conversation

@amelchio
Copy link
Copy Markdown
Contributor

@amelchio amelchio commented Sep 3, 2019

Description:

When adding a player we must rebuild all groups because the new player could be part of an existing group. This change moves the rebuilding of groups to after an entity has been appended to our local inventory.

This avoids 2+ players rebuilding groups with each not yet knowing about the other.

Related issue (if applicable): fixes #26326

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]

@amelchio amelchio added this to the 0.98.3 milestone Sep 3, 2019
@probot-home-assistant probot-home-assistant Bot added integration: sonos small-pr PRs with less than 30 lines. labels Sep 3, 2019
Comment thread homeassistant/components/sonos/media_player.py Outdated
Comment thread homeassistant/components/sonos/media_player.py Outdated
Comment thread homeassistant/components/sonos/media_player.py Outdated
@pvizeli pvizeli merged commit 3534b8a into home-assistant:dev Sep 3, 2019
balloob pushed a commit that referenced this pull request Sep 4, 2019
* Fix race during initial Sonos group construction

* Update homeassistant/components/sonos/media_player.py
@balloob balloob mentioned this pull request Sep 4, 2019
@lock lock Bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"sonos_group" doesn't update and join doesn't work - both after reboot

5 participants