Skip to content
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

Store devices as dict instead of list #16229

Merged

Conversation

Kane610
Copy link
Member

@Kane610 Kane610 commented Aug 27, 2018

Description:

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

@Kane610 Kane610 requested a review from a team as a code owner August 27, 2018 21:53
@homeassistant homeassistant added core small-pr PRs with less than 30 lines. cla-signed labels Aug 27, 2018
@ghost ghost assigned Kane610 Aug 27, 2018
@ghost ghost added the in progress label Aug 27, 2018
@@ -86,10 +86,10 @@ def async_get_or_create(self, *, config_entry, connections, identifiers,
devices = await self._store.async_load()

if devices is None:
self.devices = []
self.devices = {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OrderedDict.

@@ -7,7 +7,7 @@
def mock_registry(hass, mock_entries=None):
"""Mock the Device Registry."""
registry = device_registry.DeviceRegistry(hass)
registry.devices = mock_entries or []
registry.devices = mock_entries or {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OrderedDict

@balloob balloob merged commit 8ab31fe into home-assistant:dev Aug 27, 2018
@ghost ghost removed the in progress label Aug 27, 2018
@Kane610 Kane610 deleted the device-registry-store-devices-as-dict branch August 29, 2018 08:29
@balloob balloob mentioned this pull request Sep 17, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed core small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants