From 1517081a2dc376c7ffb0a769b0e74f2925f52d11 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Sat, 4 Nov 2023 14:47:06 +0100 Subject: [PATCH] Set device entry type for dwd_weather_warnings (#103370) * Set device entry type for dwd_weather_warnings * Set integration type to service --- homeassistant/components/dwd_weather_warnings/manifest.json | 1 + homeassistant/components/dwd_weather_warnings/sensor.py | 6 ++++-- homeassistant/generated/integrations.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/dwd_weather_warnings/manifest.json b/homeassistant/components/dwd_weather_warnings/manifest.json index dab3a39c10f..1a497b64ae3 100644 --- a/homeassistant/components/dwd_weather_warnings/manifest.json +++ b/homeassistant/components/dwd_weather_warnings/manifest.json @@ -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"] diff --git a/homeassistant/components/dwd_weather_warnings/sensor.py b/homeassistant/components/dwd_weather_warnings/sensor.py index 78154e9e4f4..6274bb4d529 100644 --- a/homeassistant/components/dwd_weather_warnings/sensor.py +++ b/homeassistant/components/dwd_weather_warnings/sensor.py @@ -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 diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index be9d1f1bf5d..dca042bed20 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -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" },