Add deprecation warning to switchbot yaml config (#62583)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
8750fd14cc
commit
e593377fba
1 changed files with 6 additions and 0 deletions
|
@ -49,6 +49,12 @@ async def async_setup_platform(
|
|||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Import yaml config and initiates config flow for Switchbot devices."""
|
||||
_LOGGER.warning(
|
||||
"Configuration of the Switchbot switch platform in YAML is deprecated and "
|
||||
"will be removed in Home Assistant 2022.4; Your existing configuration "
|
||||
"has been imported into the UI automatically and can be safely removed "
|
||||
"from your configuration.yaml file"
|
||||
)
|
||||
|
||||
# Check if entry config exists and skips import if it does.
|
||||
if hass.config_entries.async_entries(DOMAIN):
|
||||
|
|
Loading…
Add table
Reference in a new issue