mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Deprecate iCloud YAML configuration (#63875)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
0793445c40
commit
9bcdc2b847
@ -1,4 +1,6 @@
|
||||
"""The iCloud component."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
||||
@ -84,12 +86,22 @@ CONFIG_SCHEMA = vol.Schema(
|
||||
extra=vol.ALLOW_EXTRA,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up iCloud from legacy config file."""
|
||||
if (conf := config.get(DOMAIN)) is None:
|
||||
return True
|
||||
|
||||
# Note: need to remember to cleanup device_tracker (remove async_setup_scanner)
|
||||
_LOGGER.warning(
|
||||
"Configuration of the iCloud integration 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"
|
||||
)
|
||||
|
||||
for account_conf in conf:
|
||||
hass.async_create_task(
|
||||
hass.config_entries.flow.async_init(
|
||||
|
Loading…
x
Reference in New Issue
Block a user