Reduce the scope of the google calendar track deprecation (#72575)
parent
0d03b85029
commit
a35edc6751
|
@ -117,7 +117,6 @@ CONFIG_SCHEMA = vol.Schema(
|
||||||
|
|
||||||
_SINGLE_CALSEARCH_CONFIG = vol.All(
|
_SINGLE_CALSEARCH_CONFIG = vol.All(
|
||||||
cv.deprecated(CONF_MAX_RESULTS),
|
cv.deprecated(CONF_MAX_RESULTS),
|
||||||
cv.deprecated(CONF_TRACK),
|
|
||||||
vol.Schema(
|
vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required(CONF_NAME): cv.string,
|
vol.Required(CONF_NAME): cv.string,
|
||||||
|
|
|
@ -93,6 +93,11 @@ def _async_setup_entities(
|
||||||
num_entities = len(disc_info[CONF_ENTITIES])
|
num_entities = len(disc_info[CONF_ENTITIES])
|
||||||
for data in disc_info[CONF_ENTITIES]:
|
for data in disc_info[CONF_ENTITIES]:
|
||||||
entity_enabled = data.get(CONF_TRACK, True)
|
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_name = data[CONF_DEVICE_ID]
|
||||||
entity_id = generate_entity_id(ENTITY_ID_FORMAT, entity_name, hass=hass)
|
entity_id = generate_entity_id(ENTITY_ID_FORMAT, entity_name, hass=hass)
|
||||||
calendar_id = disc_info[CONF_CAL_ID]
|
calendar_id = disc_info[CONF_CAL_ID]
|
||||||
|
|
Loading…
Reference in New Issue