mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add device to DWD (#98120)
This commit is contained in:
parent
9a1bfe1e1c
commit
25231637a5
@ -24,6 +24,7 @@ from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
||||
from homeassistant.const import CONF_MONITORED_CONDITIONS, CONF_NAME
|
||||
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
@ -144,6 +145,10 @@ class DwdWeatherWarningsSensor(
|
||||
self._attr_name = f"{DEFAULT_NAME} {entry.title} {description.name}"
|
||||
self._attr_unique_id = f"{entry.unique_id}-{description.key}"
|
||||
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, entry.entry_id)}, name=f"{DEFAULT_NAME} {entry.title}"
|
||||
)
|
||||
|
||||
self.api = coordinator.api
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user