mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 10:47:10 +00:00
Improve the docstring of some config schema generators (#96296)
This commit is contained in:
parent
f3e55e96f4
commit
f46188c85a
@ -1127,7 +1127,11 @@ def _no_yaml_config_schema(
|
|||||||
|
|
||||||
|
|
||||||
def config_entry_only_config_schema(domain: str) -> Callable[[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(
|
return _no_yaml_config_schema(
|
||||||
domain,
|
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]:
|
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(
|
return _no_yaml_config_schema(
|
||||||
domain,
|
domain,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user