Raise YAML deprecation issue for Radio Therm (#75513)

This commit is contained in:
Franck Nijhof 2022-07-25 12:31:53 +02:00 committed by GitHub
parent fc9a0ba46b
commit de46243ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 1 deletions

View File

@ -18,6 +18,7 @@ from homeassistant.components.climate.const import (
HVACAction,
HVACMode,
)
from homeassistant.components.repairs import IssueSeverity, async_create_issue
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.const import (
ATTR_TEMPERATURE,
@ -125,13 +126,22 @@ async def async_setup_platform(
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Set up the Radio Thermostat."""
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(
# config flow added in 2022.7 and should be removed in 2022.9
"Configuration of the Radio Thermostat climate platform in YAML is deprecated and "
"will be removed in Home Assistant 2022.9; Your existing configuration "
"has been imported into the UI automatically and can be safely removed "
"from your configuration.yaml file"
)
hosts: list[str] = []
if CONF_HOST in config:
hosts = config[CONF_HOST]

View File

@ -3,6 +3,7 @@
"name": "Radio Thermostat",
"documentation": "https://www.home-assistant.io/integrations/radiotherm",
"requirements": ["radiotherm==2.1.0"],
"dependencies": ["repairs"],
"codeowners": ["@bdraco", "@vinnyfuria"],
"iot_class": "local_polling",
"loggers": ["radiotherm"],

View File

@ -19,6 +19,12 @@
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
},
"issues": {
"deprecated_yaml": {
"title": "The Radio Thermostat YAML configuration is being removed",
"description": "Configuring the Radio Thermostat climate platform using YAML is being removed in Home Assistant 2022.9.\n\nYour existing configuration has been imported into the UI automatically. Remove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
}
},
"options": {
"step": {
"init": {

View File

@ -19,6 +19,12 @@
}
}
},
"issues": {
"deprecated_yaml": {
"description": "Configuring the Radio Thermostat climate platform using YAML is being removed in Home Assistant 2022.9.\n\nYour existing configuration has 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 Radio Thermostat YAML configuration is being removed"
}
},
"options": {
"step": {
"init": {