From a35edc67516b0d123d5be9111db9a602ff4ecf2a Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Fri, 27 May 2022 02:52:24 -0700 Subject: [PATCH] Reduce the scope of the google calendar track deprecation (#72575) --- homeassistant/components/google/__init__.py | 1 - homeassistant/components/google/calendar.py | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/google/__init__.py b/homeassistant/components/google/__init__.py index f034d48b9c5..b7263d2e469 100644 --- a/homeassistant/components/google/__init__.py +++ b/homeassistant/components/google/__init__.py @@ -117,7 +117,6 @@ CONFIG_SCHEMA = vol.Schema( _SINGLE_CALSEARCH_CONFIG = vol.All( cv.deprecated(CONF_MAX_RESULTS), - cv.deprecated(CONF_TRACK), vol.Schema( { vol.Required(CONF_NAME): cv.string, diff --git a/homeassistant/components/google/calendar.py b/homeassistant/components/google/calendar.py index 01780702b7f..ba4368fefae 100644 --- a/homeassistant/components/google/calendar.py +++ b/homeassistant/components/google/calendar.py @@ -93,6 +93,11 @@ def _async_setup_entities( num_entities = len(disc_info[CONF_ENTITIES]) for data in disc_info[CONF_ENTITIES]: entity_enabled = data.get(CONF_TRACK, True) + if not entity_enabled: + _LOGGER.warning( + "The 'track' option in google_calendars.yaml has been deprecated. The setting " + "has been imported to the UI, and should now be removed from google_calendars.yaml" + ) entity_name = data[CONF_DEVICE_ID] entity_id = generate_entity_id(ENTITY_ID_FORMAT, entity_name, hass=hass) calendar_id = disc_info[CONF_CAL_ID]