Skip to content

Add support for zha device registry#18755

Merged
MartinHjelmare merged 1 commit intohome-assistant:devfrom
damarco:zha-device-registry
Dec 1, 2018
Merged

Add support for zha device registry#18755
MartinHjelmare merged 1 commit intohome-assistant:devfrom
damarco:zha-device-registry

Conversation

@damarco
Copy link
Copy Markdown
Contributor

@damarco damarco commented Nov 28, 2018

Description:

Adds device registry support for zha component.

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.

hass.helpers.device_registry.async_get_registry()
device_registry.async_get_or_create(
config_entry_id=config_entry.entry_id,
connections={(CONNECTION_ZIGBEE, str(APPLICATION_CONTROLLER.ieee))},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we duplicating some info in the ZhaDeviceEntity now that we add device info? Do we need to keep the ZhaDeviceEntity entity or can it be cleaned up?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not really. As we are not able to expose arbitrary data through device info, ZhaDeviceEntity is still needed. It is currently used for rx/tx status info, last_seen, network addresses and possibly other device level attributes like battery status in the future.

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@MartinHjelmare MartinHjelmare merged commit 1ae58ce into home-assistant:dev Dec 1, 2018
@ghost ghost removed the in progress label Dec 1, 2018
@balloob balloob mentioned this pull request Dec 12, 2018
@damarco damarco deleted the zha-device-registry branch December 16, 2018 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants