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

Fix race condition in group.set #18796

merged 1 commit into from Nov 29, 2018


None yet
4 participants

balloob commented Nov 29, 2018


Wraps group.set service in an async lock. Group.set contains a few awaits, which can cause a race condition and trying to create a group twice.

Related issue (if applicable): fixes #18636


  • 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.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@balloob balloob requested a review from home-assistant/core as a code owner Nov 29, 2018

@wafflebot wafflebot bot added the in progress label Nov 29, 2018

@balloob balloob added this to the 0.83.1 milestone Nov 29, 2018

await async_setup_component(hass, 'group', {})
component = EntityComponent(_LOGGER, DOMAIN, hass, group_name='yo')
for i in range(2):

This comment has been minimized.


42B Nov 29, 2018

for _ in range(2):  # ?

@balloob balloob merged commit 38ecf71 into dev Nov 29, 2018

3 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/travis-ci/push The Travis CI build is in progress
Hound No violations found. Woof!
WIP ready for review
cla-bot Everyone involved has signed the CLA

@delete-merged-branch delete-merged-branch bot deleted the fix-race-group branch Nov 29, 2018

@wafflebot wafflebot bot removed the in progress label Nov 29, 2018

balloob added a commit that referenced this pull request Nov 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment