Set hvv_departures device entry type to service (#80964)

pull/81026/head
Tom Schneider 2022-10-26 15:48:13 +02:00 committed by GitHub
parent b786440eda
commit fbe7a0289c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@ from homeassistant.components.binary_sensor import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import (
@ -150,6 +151,7 @@ class HvvDepartureBinarySensor(CoordinatorEntity, BinarySensorEntity):
def device_info(self):
"""Return the device info for this sensor."""
return DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={
(
DOMAIN,

View File

@ -11,6 +11,7 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_ID
from homeassistant.core import HomeAssistant
from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.util import Throttle
@ -167,6 +168,7 @@ class HVVDepartureSensor(SensorEntity):
def device_info(self):
"""Return the device info for this sensor."""
return DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={
(
DOMAIN,