From b5b4c2d2bc839ab6a1e5d3d42663527de32bd992 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 4 Feb 2020 09:46:40 -0800 Subject: [PATCH] Update disabled_by recommendation (#396) * Update disabled_by suggestion * Clarify --- docs/entity_registry_disabled_by.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/entity_registry_disabled_by.md b/docs/entity_registry_disabled_by.md index d494f5fc..fb5def1f 100644 --- a/docs/entity_registry_disabled_by.md +++ b/docs/entity_registry_disabled_by.md @@ -33,11 +33,8 @@ If `disable_new_entities` is set to `True` and `entity_registry_enabled_default` ## Integrations offering options to control disabled_by -Some integrations will want to offer options to the user to control which entities are being added to Home Assistant. For example, the Unifi integration might want to offer to only include wireless clients but exclude wired clients. Another example is that the Hue integration offers an option to make the groups defined inside Hue available in Home Assistant. +Some integrations will want to offer options to the user to control which entities are being added to Home Assistant. For example, the Unifi integration offers options to enable/disable wireless and wired clients. Integrations can offer options to users either via [configuration.yaml](configuration_yaml_index) or using an [Options Flow](config_entries_options_flow_handler.md). -It is important that if an integration offers an option to change which entities are exposed that: - -- The option is only applied to existing integrations the first time it is set. It should not be applied on every reboot. This allows the user to enable individual entities. -- The option should impact the value of the entity property `entity_registry_enabled_default` so that new entities are disabled properly. +If this option is offered by integrations, you should not leverage the disabled_by property in the entity registry. Instead, if entities are disabled via a config options flow, remove them from the device and entity registry.