mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Set device entry type for dwd_weather_warnings (#103370)
* Set device entry type for dwd_weather_warnings * Set integration type to service
This commit is contained in:
parent
216349de25
commit
1517081a2d
@ -4,6 +4,7 @@
|
|||||||
"codeowners": ["@runningman84", "@stephan192", "@andarotajo"],
|
"codeowners": ["@runningman84", "@stephan192", "@andarotajo"],
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/dwd_weather_warnings",
|
"documentation": "https://www.home-assistant.io/integrations/dwd_weather_warnings",
|
||||||
|
"integration_type": "service",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["dwdwfsapi"],
|
"loggers": ["dwdwfsapi"],
|
||||||
"requirements": ["dwdwfsapi==1.0.6"]
|
"requirements": ["dwdwfsapi==1.0.6"]
|
||||||
|
@ -24,7 +24,7 @@ from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
|||||||
from homeassistant.const import CONF_MONITORED_CONDITIONS, CONF_NAME
|
from homeassistant.const import CONF_MONITORED_CONDITIONS, CONF_NAME
|
||||||
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
|
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.device_registry import DeviceInfo
|
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
||||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||||
@ -146,7 +146,9 @@ class DwdWeatherWarningsSensor(
|
|||||||
self._attr_unique_id = f"{entry.unique_id}-{description.key}"
|
self._attr_unique_id = f"{entry.unique_id}-{description.key}"
|
||||||
|
|
||||||
self._attr_device_info = DeviceInfo(
|
self._attr_device_info = DeviceInfo(
|
||||||
identifiers={(DOMAIN, entry.entry_id)}, name=f"{DEFAULT_NAME} {entry.title}"
|
identifiers={(DOMAIN, entry.entry_id)},
|
||||||
|
name=f"{DEFAULT_NAME} {entry.title}",
|
||||||
|
entry_type=DeviceEntryType.SERVICE,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.api = coordinator.api
|
self.api = coordinator.api
|
||||||
|
@ -1270,7 +1270,7 @@
|
|||||||
},
|
},
|
||||||
"dwd_weather_warnings": {
|
"dwd_weather_warnings": {
|
||||||
"name": "Deutscher Wetterdienst (DWD) Weather Warnings",
|
"name": "Deutscher Wetterdienst (DWD) Weather Warnings",
|
||||||
"integration_type": "hub",
|
"integration_type": "service",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"iot_class": "cloud_polling"
|
"iot_class": "cloud_polling"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user