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

Save disabled_by in entity registry #16699

Merged
merged 2 commits into from
Sep 19, 2018

Conversation

cgarwood
Copy link
Member

@cgarwood cgarwood commented Sep 18, 2018

Description:

The entity registry supports a disabled_by field to exclude entities from being processed. When the entity_registry is automatically generated/updated by HA, the disabled_by field was not included and would be stripped out.

Related issue (if applicable): fixes #13643

Pull request in home-assistant.github.io with documentation (if applicable): N/A

Example entry for configuration.yaml (if applicable):

N/A

Checklist:

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

@@ -240,6 +240,7 @@ def _data_to_save(self):
'unique_id': entry.unique_id,
'platform': entry.platform,
'name': entry.name,
'disabled_by': entry.disabled_by
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a trailing comma so the next addition can also be a single-line diff.

@balloob
Copy link
Member

balloob commented Sep 19, 2018

Can you update the test to make sure we don't forget about it again

@balloob balloob merged commit da88267 into home-assistant:dev Sep 19, 2018
@ghost ghost removed the in progress label Sep 19, 2018
@balloob
Copy link
Member

balloob commented Sep 19, 2018

Merging it without the test because I don't want to have disabled_by added to get_or_create just yet. It's still an experimental attribute.

@balloob balloob mentioned this pull request Sep 28, 2018
@cgarwood cgarwood deleted the entity_registry_disabled_fix branch October 16, 2018 14:14
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
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.

Adding zwave components causes entity_registry to lose disabled_by property
4 participants