Add deprecation warning to switchbot yaml config (#62583)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Robert Hillis 2021-12-22 16:17:53 -05:00 committed by GitHub
parent 8750fd14cc
commit e593377fba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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):