Add issue to repairs for deprecated Simplepush YAML configuration (#75850)
parent
0317cbb388
commit
4f25b8d58e
|
@ -5,6 +5,7 @@
|
|||
"requirements": ["simplepush==1.1.4"],
|
||||
"codeowners": ["@engrbm87"],
|
||||
"config_flow": true,
|
||||
"dependencies": ["repairs"],
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["simplepush"]
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@ from homeassistant.components.notify import (
|
|||
BaseNotificationService,
|
||||
)
|
||||
from homeassistant.components.notify.const import ATTR_DATA
|
||||
from homeassistant.components.repairs.issue_handler import async_create_issue
|
||||
from homeassistant.components.repairs.models import IssueSeverity
|
||||
from homeassistant.config_entries import SOURCE_IMPORT
|
||||
from homeassistant.const import CONF_EVENT, CONF_PASSWORD
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -41,6 +43,16 @@ async def async_get_service(
|
|||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> SimplePushNotificationService | None:
|
||||
"""Get the Simplepush notification service."""
|
||||
async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"deprecated_yaml",
|
||||
breaks_in_ha_version="2022.9.0",
|
||||
is_fixable=False,
|
||||
severity=IssueSeverity.WARNING,
|
||||
translation_key="deprecated_yaml",
|
||||
)
|
||||
|
||||
if discovery_info is None:
|
||||
hass.async_create_task(
|
||||
hass.config_entries.flow.async_init(
|
||||
|
|
|
@ -17,5 +17,11 @@
|
|||
"abort": {
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||
}
|
||||
},
|
||||
"issues": {
|
||||
"deprecated_yaml": {
|
||||
"title": "The Simplepush YAML configuration is being removed",
|
||||
"description": "Configuring Simplepush using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the Simplepush YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,5 +17,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"issues": {
|
||||
"deprecated_yaml": {
|
||||
"title": "The Simplepush YAML configuration is being removed",
|
||||
"description": "Configuring Simplepush using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the Simplepush YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue