Deprecate yaml config for fritzbox callmonitor (#61762)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
pull/66742/head
Robert Hillis 2022-02-23 09:22:50 -05:00 committed by GitHub
parent 0a6e30e4b9
commit 8befb3b905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -55,6 +55,7 @@ _LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL = timedelta(hours=3)
# Deprecated in Home Assistant 2022.3
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
@ -75,6 +76,12 @@ async def async_setup_platform(
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Import the platform into a config entry."""
_LOGGER.warning(
"Configuration of the AVM FRITZ!Box Call Monitor sensor platform in YAML "
"is deprecated and will be removed in Home Assistant 2022.5; "
"Your existing configuration has been imported into the UI automatically "
"and can be safely removed from your configuration.yaml file"
)
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=config