|
2 | 2 |
|
3 | 3 | import logging
|
4 | 4 |
|
5 |
| -import voluptuous as vol |
6 |
| - |
7 | 5 | from homeassistant.config_entries import ConfigEntry
|
8 | 6 | from homeassistant.const import CONF_API_KEY, CONF_HOST
|
9 | 7 | from homeassistant.core import HomeAssistant
|
10 |
| -from homeassistant.helpers import issue_registry as ir |
11 |
| -import homeassistant.helpers.config_validation as cv |
12 |
| -from homeassistant.helpers.typing import ConfigType |
13 | 8 |
|
14 |
| -from .const import CONF_APP_ID, DOMAIN, PLATFORMS, TTN_API_HOST |
| 9 | +from .const import DOMAIN, PLATFORMS, TTN_API_HOST |
15 | 10 | from .coordinator import TTNCoordinator
|
16 | 11 |
|
17 | 12 | _LOGGER = logging.getLogger(__name__)
|
18 | 13 |
|
19 |
| -CONFIG_SCHEMA = vol.Schema( |
20 |
| - { |
21 |
| - # Configuration via yaml not longer supported - keeping to warn about migration |
22 |
| - DOMAIN: vol.Schema( |
23 |
| - { |
24 |
| - vol.Required(CONF_APP_ID): cv.string, |
25 |
| - vol.Required("access_key"): cv.string, |
26 |
| - } |
27 |
| - ) |
28 |
| - }, |
29 |
| - extra=vol.ALLOW_EXTRA, |
30 |
| -) |
31 |
| - |
32 |
| - |
33 |
| -async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: |
34 |
| - """Initialize of The Things Network component.""" |
35 |
| - |
36 |
| - if DOMAIN in config: |
37 |
| - ir.async_create_issue( |
38 |
| - hass, |
39 |
| - DOMAIN, |
40 |
| - "manual_migration", |
41 |
| - breaks_in_ha_version="2024.12.0", |
42 |
| - is_fixable=False, |
43 |
| - severity=ir.IssueSeverity.ERROR, |
44 |
| - translation_key="manual_migration", |
45 |
| - translation_placeholders={ |
46 |
| - "domain": DOMAIN, |
47 |
| - "v2_v3_migration_url": "https://www.thethingsnetwork.org/forum/c/v2-to-v3-upgrade/102", |
48 |
| - "v2_deprecation_url": "https://www.thethingsnetwork.org/forum/t/the-things-network-v2-is-permanently-shutting-down-completed/50710", |
49 |
| - }, |
50 |
| - ) |
51 |
| - |
52 |
| - return True |
53 |
| - |
54 | 14 |
|
55 | 15 | async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
56 | 16 | """Establish connection with The Things Network."""
|
|
0 commit comments