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:
Jan-Philipp Benecke 2023-11-04 14:47:06 +01:00 committed by GitHub
parent 216349de25
commit 1517081a2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -4,6 +4,7 @@
"codeowners": ["@runningman84", "@stephan192", "@andarotajo"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/dwd_weather_warnings",
"integration_type": "service",
"iot_class": "cloud_polling",
"loggers": ["dwdwfsapi"],
"requirements": ["dwdwfsapi==1.0.6"]

View File

@ -24,7 +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.device_registry import DeviceInfo
from homeassistant.helpers.device_registry import DeviceEntryType, 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
@ -146,7 +146,9 @@ class DwdWeatherWarningsSensor(
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}"
identifiers={(DOMAIN, entry.entry_id)},
name=f"{DEFAULT_NAME} {entry.title}",
entry_type=DeviceEntryType.SERVICE,
)
self.api = coordinator.api

View File

@ -1270,7 +1270,7 @@
},
"dwd_weather_warnings": {
"name": "Deutscher Wetterdienst (DWD) Weather Warnings",
"integration_type": "hub",
"integration_type": "service",
"config_flow": true,
"iot_class": "cloud_polling"
},