Start deprecation yaml season (#77781)

This commit is contained in:
G Johansson 2022-09-26 16:08:27 +02:00 committed by GitHub
parent 58e9ad8c1d
commit 05568792d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from homeassistant.util.dt import utcnow
@ -62,6 +63,15 @@ async def async_setup_platform(
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Set up the season sensor platform."""
async_create_issue(
hass,
DOMAIN,
"removed_yaml",
breaks_in_ha_version="2022.12.0",
is_fixable=False,
severity=IssueSeverity.WARNING,
translation_key="removed_yaml",
)
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN,

View File

@ -10,5 +10,11 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]"
}
},
"issues": {
"removed_yaml": {
"title": "The Season YAML configuration has been removed",
"description": "Configuring Season 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

@ -10,5 +10,11 @@
}
}
}
},
"issues": {
"removed_yaml": {
"description": "Configuring Season 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 Season YAML configuration has been removed"
}
}
}