mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 18:27:51 +00:00
Deprecate DTE Energy Bridge (#120350)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
00621ad512
commit
6689dbbcc6
@ -18,6 +18,7 @@ from homeassistant.const import CONF_NAME, UnitOfPower
|
|||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
from homeassistant.helpers.issue_registry import IssueSeverity, create_issue
|
||||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -27,6 +28,7 @@ CONF_VERSION = "version"
|
|||||||
|
|
||||||
DEFAULT_NAME = "Current Energy Usage"
|
DEFAULT_NAME = "Current Energy Usage"
|
||||||
DEFAULT_VERSION = 1
|
DEFAULT_VERSION = 1
|
||||||
|
DOMAIN = "dte_energy_bridge"
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
{
|
{
|
||||||
@ -46,6 +48,18 @@ def setup_platform(
|
|||||||
discovery_info: DiscoveryInfoType | None = None,
|
discovery_info: DiscoveryInfoType | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the DTE energy bridge sensor."""
|
"""Set up the DTE energy bridge sensor."""
|
||||||
|
create_issue(
|
||||||
|
hass,
|
||||||
|
DOMAIN,
|
||||||
|
"deprecated_integration",
|
||||||
|
breaks_in_ha_version="2025.1.0",
|
||||||
|
is_fixable=False,
|
||||||
|
issue_domain=DOMAIN,
|
||||||
|
severity=IssueSeverity.WARNING,
|
||||||
|
translation_key="deprecated_integration",
|
||||||
|
translation_placeholders={"domain": DOMAIN},
|
||||||
|
)
|
||||||
|
|
||||||
name = config[CONF_NAME]
|
name = config[CONF_NAME]
|
||||||
ip_address = config[CONF_IP_ADDRESS]
|
ip_address = config[CONF_IP_ADDRESS]
|
||||||
version = config[CONF_VERSION]
|
version = config[CONF_VERSION]
|
||||||
|
8
homeassistant/components/dte_energy_bridge/strings.json
Normal file
8
homeassistant/components/dte_energy_bridge/strings.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"issues": {
|
||||||
|
"deprecated_integration": {
|
||||||
|
"title": "The DTE Energy Bridge integration will be removed",
|
||||||
|
"description": "The DTE Energy Bridge integration will be removed as new users can't get any supported devices, and the integration will fail as soon as a current device gets internet access.\n\n Please remove all `{domain}`platform sensors from your configuration and restart Home Assistant."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user