Add issue to repairs for deprecated Simplepush YAML configuration (#75850)

pull/75856/head
Rami Mosleh 2022-07-28 12:05:56 +03:00 committed by GitHub
parent 0317cbb388
commit 4f25b8d58e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 0 deletions

View File

@ -5,6 +5,7 @@
"requirements": ["simplepush==1.1.4"],
"codeowners": ["@engrbm87"],
"config_flow": true,
"dependencies": ["repairs"],
"iot_class": "cloud_polling",
"loggers": ["simplepush"]
}

View File

@ -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(

View File

@ -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."
}
}
}

View File

@ -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."
}
}
}