Skip to content

Commit

Permalink
Improve the docstring of some config schema generators (#96296)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery committed Jul 11, 2023
1 parent f3e55e9 commit f46188c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions homeassistant/helpers/config_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,11 @@ def validator(config: dict) -> dict:


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,
Expand All @@ -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,
Expand Down

0 comments on commit f46188c

Please sign in to comment.