mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Deprecate YAML configuration for ISY994 (#85797)
This commit is contained in:
parent
8dadbe45fa
commit
d35c4f8d82
@ -24,6 +24,7 @@ from homeassistant.helpers import aiohttp_client, config_validation as cv
|
|||||||
import homeassistant.helpers.device_registry as dr
|
import homeassistant.helpers.device_registry as dr
|
||||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||||
from homeassistant.helpers.entity import DeviceInfo
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
|
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
@ -54,6 +55,8 @@ from .services import async_setup_services, async_unload_services
|
|||||||
from .util import _async_cleanup_registry_entries
|
from .util import _async_cleanup_registry_entries
|
||||||
|
|
||||||
CONFIG_SCHEMA = vol.Schema(
|
CONFIG_SCHEMA = vol.Schema(
|
||||||
|
vol.All(
|
||||||
|
cv.deprecated(DOMAIN),
|
||||||
{
|
{
|
||||||
DOMAIN: vol.Schema(
|
DOMAIN: vol.Schema(
|
||||||
{
|
{
|
||||||
@ -73,9 +76,10 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
vol.Required(
|
vol.Required(
|
||||||
CONF_RESTORE_LIGHT_STATE, default=DEFAULT_RESTORE_LIGHT_STATE
|
CONF_RESTORE_LIGHT_STATE, default=DEFAULT_RESTORE_LIGHT_STATE
|
||||||
): bool,
|
): bool,
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
),
|
||||||
extra=vol.ALLOW_EXTRA,
|
extra=vol.ALLOW_EXTRA,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,6 +92,16 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
if not isy_config:
|
if not isy_config:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
async_create_issue(
|
||||||
|
hass,
|
||||||
|
DOMAIN,
|
||||||
|
"deprecated_yaml",
|
||||||
|
breaks_in_ha_version="2023.5.0",
|
||||||
|
is_fixable=False,
|
||||||
|
severity=IssueSeverity.WARNING,
|
||||||
|
translation_key="deprecated_yaml",
|
||||||
|
)
|
||||||
|
|
||||||
# Only import if we haven't before.
|
# Only import if we haven't before.
|
||||||
config_entry = _async_find_matching_config_entry(hass)
|
config_entry = _async_find_matching_config_entry(hass)
|
||||||
if not config_entry:
|
if not config_entry:
|
||||||
|
@ -62,6 +62,10 @@
|
|||||||
"confirm": {
|
"confirm": {
|
||||||
"title": "The {deprecated_service} service will be removed",
|
"title": "The {deprecated_service} service will be removed",
|
||||||
"description": "Update any automations or scripts that use this service to instead use the `{alternate_service}` service with a target entity ID of `{alternate_target}`."
|
"description": "Update any automations or scripts that use this service to instead use the `{alternate_service}` service with a target entity ID of `{alternate_target}`."
|
||||||
|
},
|
||||||
|
"deprecated_yaml": {
|
||||||
|
"title": "The ISY/IoX YAML configuration is being removed",
|
||||||
|
"description": "Configuring Universal Devices ISY/IoX using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the `isy994` YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title": "The {deprecated_service} service will be removed"
|
"title": "The {deprecated_service} service will be removed"
|
||||||
|
},
|
||||||
|
"deprecated_yaml": {
|
||||||
|
"title": "The ISY/IoX YAML configuration is being removed",
|
||||||
|
"description": "Configuring Universal Devices ISY/IoX using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the `isy994` YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user