Raise issue for Google Calendar YAML deprecations (#75743)
This commit is contained in:
parent
5e45b0baf9
commit
47713d9686
4 changed files with 39 additions and 12 deletions
homeassistant/components/google
|
@ -20,6 +20,7 @@ from homeassistant.components.application_credentials import (
|
|||
ClientCredential,
|
||||
async_import_client_credential,
|
||||
)
|
||||
from homeassistant.components.repairs import IssueSeverity, async_create_issue
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
CONF_CLIENT_ID,
|
||||
|
@ -203,21 +204,27 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
},
|
||||
)
|
||||
)
|
||||
|
||||
_LOGGER.warning(
|
||||
"Configuration of Google Calendar in YAML in configuration.yaml is "
|
||||
"is deprecated and will be removed in a future release; Your existing "
|
||||
"OAuth Application Credentials and access settings have been imported "
|
||||
"into the UI automatically and can be safely removed from your "
|
||||
"configuration.yaml file"
|
||||
async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"deprecated_yaml",
|
||||
breaks_in_ha_version="2022.9.0", # Warning first added in 2022.6.0
|
||||
is_fixable=False,
|
||||
severity=IssueSeverity.WARNING,
|
||||
translation_key="deprecated_yaml",
|
||||
)
|
||||
if conf.get(CONF_TRACK_NEW) is False:
|
||||
# The track_new as False would previously result in new entries
|
||||
# in google_calendars.yaml with track set to Fasle which is
|
||||
# in google_calendars.yaml with track set to False which is
|
||||
# handled at calendar entity creation time.
|
||||
_LOGGER.warning(
|
||||
"You must manually set the integration System Options in the "
|
||||
"UI to disable newly discovered entities going forward"
|
||||
async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"removed_track_new_yaml",
|
||||
breaks_in_ha_version="2022.6.0",
|
||||
is_fixable=False,
|
||||
severity=IssueSeverity.WARNING,
|
||||
translation_key="removed_track_new_yaml",
|
||||
)
|
||||
return True
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"domain": "google",
|
||||
"name": "Google Calendars",
|
||||
"config_flow": true,
|
||||
"dependencies": ["application_credentials"],
|
||||
"dependencies": ["application_credentials", "repairs"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/calendar.google/",
|
||||
"requirements": ["gcal-sync==0.10.0", "oauth2client==4.1.3"],
|
||||
"codeowners": ["@allenporter"],
|
||||
|
|
|
@ -41,5 +41,15 @@
|
|||
},
|
||||
"application_credentials": {
|
||||
"description": "Follow the [instructions]({more_info_url}) for [OAuth consent screen]({oauth_consent_url}) to give Home Assistant access to your Google Calendar. You also need to create Application Credentials linked to your Calendar:\n1. Go to [Credentials]({oauth_creds_url}) and click **Create Credentials**.\n1. From the drop-down list select **OAuth client ID**.\n1. Select **TV and Limited Input devices** for the Application Type.\n\n"
|
||||
},
|
||||
"issues": {
|
||||
"deprecated_yaml": {
|
||||
"title": "The Google Calendar YAML configuration is being removed",
|
||||
"description": "Configuring the Google Calendar in configuration.yaml is being removed in Home Assistant 2022.9.\n\nYour existing OAuth Application Credentials and access settings have been imported into the UI automatically. Remove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
|
||||
},
|
||||
"removed_track_new_yaml": {
|
||||
"title": "Google Calendar entity tracking has changed",
|
||||
"description": "You have disabled entity tracking for Google Calendar in configuration.yaml, which is no longer supported. You must manually change the integration System Options in the UI to disable newly discovered entities going forward. Remove the track_new setting from configuration.yaml and restart Home Assistant to fix this issue."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"issues": {
|
||||
"deprecated_yaml": {
|
||||
"description": "Configuring the Google Calendar in configuration.yaml is being removed in Home Assistant 2022.9.\n\nYour existing OAuth Application Credentials and access settings have been imported into the UI automatically. Remove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.",
|
||||
"title": "The Google Calendar YAML configuration is being removed"
|
||||
},
|
||||
"removed_track_new_yaml": {
|
||||
"description": "Your Google Calendar configuration.yaml has disabled new entity tracking, which is no longer supported. You must manually set the integration System Options in the UI to disable newly discovered entities going forward. Remove the track_new setting from configuration.yaml and restart Home Assistant to fix this issue.",
|
||||
"title": "The Google Calendar entity tracking has changed"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"step": {
|
||||
"init": {
|
||||
|
|
Loading…
Add table
Reference in a new issue