Raise YAML removal issue for Lyric (#75756)

This commit is contained in:
Franck Nijhof 2022-07-26 20:02:50 +02:00 committed by GitHub
parent cb17a01e48
commit 157f7292d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 1 deletions

View file

@ -12,6 +12,7 @@ from aiolyric.objects.device import LyricDevice
from aiolyric.objects.location import LyricLocation
import async_timeout
from homeassistant.components.repairs import IssueSeverity, async_create_issue
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
@ -23,6 +24,7 @@ from homeassistant.helpers import (
device_registry as dr,
)
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.typing import ConfigType
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
DataUpdateCoordinator,
@ -43,6 +45,22 @@ _LOGGER = logging.getLogger(__name__)
PLATFORMS = [Platform.CLIMATE, Platform.SENSOR]
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Honeywell Lyric integration."""
if DOMAIN in config:
async_create_issue(
hass,
DOMAIN,
"removed_yaml",
breaks_in_ha_version="2022.8.0",
is_fixable=False,
severity=IssueSeverity.WARNING,
translation_key="removed_yaml",
)
return True
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Honeywell Lyric from a config entry."""
implementation = (

View file

@ -3,7 +3,7 @@
"name": "Honeywell Lyric",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/lyric",
"dependencies": ["application_credentials"],
"dependencies": ["application_credentials", "repairs"],
"requirements": ["aiolyric==1.0.8"],
"codeowners": ["@timmo001"],
"quality_scale": "silver",

View file

@ -17,5 +17,11 @@
"create_entry": {
"default": "[%key:common::config_flow::create_entry::authenticated%]"
}
},
"issues": {
"removed_yaml": {
"title": "The Honeywell Lyric YAML configuration has been removed",
"description": "Configuring Honeywell Lyric using YAML has been removed.\n\nYour existing YAML configuration is not used by Home Assistant.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
}
}
}

View file

@ -17,5 +17,11 @@
"title": "Reauthenticate Integration"
}
}
},
"issues": {
"removed_yaml": {
"description": "Configuring Honeywell Lyric using YAML has been removed.\n\nYour existing YAML configuration is not used by Home Assistant.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.",
"title": "The Honeywell Lyric YAML configuration has been removed"
}
}
}