Raise YAML removal issue for Xbox (#75843)

This commit is contained in:
Franck Nijhof 2022-07-27 23:49:22 +02:00 committed by GitHub
parent 4aa6300b8b
commit f07d64e7db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 2 deletions

View file

@ -21,6 +21,7 @@ from xbox.webapi.api.provider.smartglass.models import (
)
from homeassistant.components import application_credentials
from homeassistant.components.repairs import IssueSeverity, async_create_issue
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, Platform
from homeassistant.core import HomeAssistant
@ -74,9 +75,18 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
config[DOMAIN][CONF_CLIENT_ID], config[DOMAIN][CONF_CLIENT_SECRET]
),
)
async_create_issue(
hass,
DOMAIN,
"deprecated_yaml",
breaks_in_ha_version="2022.9.0",
is_fixable=False,
severity=IssueSeverity.WARNING,
translation_key="deprecated_yaml",
)
_LOGGER.warning(
"Configuration of Xbox integration in YAML is deprecated and "
"will be removed in a future release; Your existing configuration "
"will be removed in Home Assistant 2022.9.; Your existing configuration "
"(including OAuth Application Credentials) has been imported into "
"the UI automatically and can be safely removed from your "
"configuration.yaml file"

View file

@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/xbox",
"requirements": ["xbox-webapi==2.0.11"],
"dependencies": ["auth", "application_credentials"],
"dependencies": ["auth", "application_credentials", "repairs"],
"codeowners": ["@hunterjm"],
"iot_class": "cloud_polling"
}

View file

@ -13,5 +13,11 @@
"create_entry": {
"default": "[%key:common::config_flow::create_entry::authenticated%]"
}
},
"issues": {
"deprecated_yaml": {
"title": "The Xbox YAML configuration is being removed",
"description": "Configuring the Xbox 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."
}
}
}

View file

@ -13,5 +13,11 @@
"title": "Pick Authentication Method"
}
}
},
"issues": {
"deprecated_yaml": {
"description": "Configuring the Xbox 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 Xbox YAML configuration is being removed"
}
}
}