Raise YAML removal issue for Bose SoundTouch (#75817)

This commit is contained in:
Franck Nijhof 2022-07-27 14:41:00 +02:00 committed by GitHub
parent 49854b809c
commit 9dc0544835
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 4 deletions

View File

@ -4,6 +4,7 @@
"documentation": "https://www.home-assistant.io/integrations/soundtouch",
"requirements": ["libsoundtouch==0.8"],
"zeroconf": ["_soundtouch._tcp.local."],
"dependencies": ["repairs"],
"codeowners": ["@kroimon"],
"iot_class": "local_polling",
"loggers": ["libsoundtouch"],

View File

@ -19,6 +19,7 @@ from homeassistant.components.media_player import (
from homeassistant.components.media_player.browse_media import (
async_process_play_media_url,
)
from homeassistant.components.repairs import IssueSeverity, async_create_issue
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.const import (
CONF_HOST,
@ -70,11 +71,20 @@ async def async_setup_platform(
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Set up the Bose SoundTouch platform."""
async_create_issue(
hass,
DOMAIN,
"deprecated_yaml",
breaks_in_ha_version="2022.10.0",
is_fixable=False,
severity=IssueSeverity.WARNING,
translation_key="deprecated_yaml",
)
_LOGGER.warning(
"Configuration of the Bose SoundTouch platform in YAML is deprecated and will be "
"removed in a future release; Your existing configuration "
"has been imported into the UI automatically and can be safely removed "
"from your configuration.yaml file"
"Configuration of the Bose SoundTouch integration in YAML is "
"deprecated and will be removed in Home Assistant 2022.10; Your "
"existing configuration has been imported into the UI automatically "
"and can be safely removed from your configuration.yaml file"
)
hass.async_create_task(
hass.config_entries.flow.async_init(

View File

@ -17,5 +17,11 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
},
"issues": {
"deprecated_yaml": {
"title": "The Bose SoundTouch YAML configuration is being removed",
"description": "Configuring Bose SoundTouch using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the Bose SoundTouch YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
}
}
}

View File

@ -17,5 +17,11 @@
"title": "Confirm adding Bose SoundTouch device"
}
}
},
"issues": {
"deprecated_yaml": {
"description": "Configuring Bose SoundTouch using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the Bose SoundTouch YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.",
"title": "The Bose SoundTouch YAML configuration is being removed"
}
}
}