-
Notifications
You must be signed in to change notification settings - Fork 14
/
create_issue.patch
44 lines (41 loc) · 1.63 KB
/
create_issue.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff --git a/custom_components/bmw_connected_drive/__init__.py b/custom_components/bmw_connected_drive/__init__.py
index 9e43cfc..9921e3f 100644
--- a/custom_components/bmw_connected_drive/__init__.py
+++ b/custom_components/bmw_connected_drive/__init__.py
@@ -14,6 +14,7 @@ from homeassistant.helpers import (
device_registry as dr,
discovery,
entity_registry as er,
+ issue_registry as ir,
)
import homeassistant.helpers.config_validation as cv
@@ -130,6 +131,16 @@ async def _async_migrate_entries(
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up BMW Connected Drive from a config entry."""
+ ir.async_create_issue(
+ hass,
+ DOMAIN,
+ "stop_using_custom_component",
+ is_fixable=False,
+ severity=ir.IssueSeverity.ERROR,
+ translation_key="stop_using_custom_component",
+ )
+
_async_migrate_options_from_data_if_missing(hass, entry)
await _async_migrate_entries(hass, entry)
diff --git a/custom_components/bmw_connected_drive/strings.json b/custom_components/bmw_connected_drive/strings.json
index 8078971..65be86f 100644
--- a/custom_components/bmw_connected_drive/strings.json
+++ b/custom_components/bmw_connected_drive/strings.json
@@ -215,5 +215,11 @@
"missing_captcha": {
"message": "Login requires captcha validation"
}
+ },
+ "issues": {
+ "stop_using_custom_component": {
+ "title": "Stop using custom component",
+ "description": "The custom component for BMW Connected Drive is outdated. Please remove the custom component and use the version shipped with Home Assistant."
+ }
}
}