Skip to content

Entity Registry: disable entities#12360

Merged
pvizeli merged 1 commit intodevfrom
registry-disable-entities
Feb 13, 2018
Merged

Entity Registry: disable entities#12360
pvizeli merged 1 commit intodevfrom
registry-disable-entities

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Feb 12, 2018

Description:

Add ability to disable entities from the entity registry. When a disabled entity is passed to async_add_entities, it will be ignored.

To disable an entity, add the key disabled_by: user to an entity. We might in the future also get disabled_by: hass if an entity is doing I/O in the event loop or misbehaving in any other way 👍

For integrations to make sure that they don't do any extra work, they should make sure to only listen for updates to their entities when async_added_to_hass is called.

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@pvizeli pvizeli merged commit d2cea84 into dev Feb 13, 2018
@pvizeli pvizeli deleted the registry-disable-entities branch February 13, 2018 12:33
@balloob balloob mentioned this pull request Feb 22, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
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.

3 participants