From f46188c85a3fecdacf6cf5de09c3127ae4bfe9f1 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 11 Jul 2023 11:34:16 +0200 Subject: [PATCH] Improve the docstring of some config schema generators (#96296) --- homeassistant/helpers/config_validation.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/config_validation.py b/homeassistant/helpers/config_validation.py index e8f1e58615c..90aa499af4b 100644 --- a/homeassistant/helpers/config_validation.py +++ b/homeassistant/helpers/config_validation.py @@ -1127,7 +1127,11 @@ def _no_yaml_config_schema( def config_entry_only_config_schema(domain: str) -> Callable[[dict], dict]: - """Return a config schema which logs if attempted to setup from YAML.""" + """Return a config schema which logs if attempted to setup from YAML. + + Use this when an integration's __init__.py defines setup or async_setup + but setup from yaml is not supported. + """ return _no_yaml_config_schema( domain, @@ -1138,7 +1142,11 @@ def config_entry_only_config_schema(domain: str) -> Callable[[dict], dict]: def platform_only_config_schema(domain: str) -> Callable[[dict], dict]: - """Return a config schema which logs if attempted to setup from YAML.""" + """Return a config schema which logs if attempted to setup from YAML. + + Use this when an integration's __init__.py defines setup or async_setup + but setup from the integration key is not supported. + """ return _no_yaml_config_schema( domain,