Raise YAML removal issue for Anthem A/V Receivers (#75816)

This commit is contained in:
Franck Nijhof 2022-07-27 14:17:22 +02:00 committed by GitHub
parent 6254142b8a
commit 314778cb50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 1 deletions

View file

@ -3,6 +3,7 @@
"name": "Anthem A/V Receivers",
"documentation": "https://www.home-assistant.io/integrations/anthemav",
"requirements": ["anthemav==1.3.2"],
"dependencies": ["repairs"],
"codeowners": ["@hyralex"],
"config_flow": true,
"iot_class": "local_push",

View file

@ -12,6 +12,7 @@ from homeassistant.components.media_player import (
MediaPlayerEntity,
MediaPlayerEntityFeature,
)
from homeassistant.components.repairs import IssueSeverity, async_create_issue
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.const import (
CONF_HOST,
@ -55,8 +56,20 @@ async def async_setup_platform(
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Set up our socket to the AVR."""
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(
"AnthemAV configuration is deprecated and has been automatically imported. Please remove the integration from your configuration file"
"Configuration of the Anthem A/V Receivers 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"
)
await hass.config_entries.flow.async_init(
DOMAIN,

View file

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

View file

@ -15,5 +15,11 @@
}
}
}
},
"issues": {
"deprecated_yaml": {
"description": "Configuring Anthem A/V Receivers using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the Anthem A/V Receivers YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.",
"title": "The Anthem A/V Receivers YAML configuration is being removed"
}
}
}