Add device to Garage Amsterdam entity (#98573)

This commit is contained in:
Joost Lekkerkerker 2023-08-18 11:48:00 +02:00 committed by GitHub
parent 7ac2c61f24
commit 80a5e341b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,12 +1,13 @@
"""Generic entity for Garages Amsterdam."""
from __future__ import annotations
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
DataUpdateCoordinator,
)
from .const import ATTRIBUTION
from .const import ATTRIBUTION, DOMAIN
class GaragesAmsterdamEntity(CoordinatorEntity):
@ -22,3 +23,8 @@ class GaragesAmsterdamEntity(CoordinatorEntity):
self._attr_unique_id = f"{garage_name}-{info_type}"
self._garage_name = garage_name
self._info_type = info_type
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, garage_name)},
name=garage_name,
entry_type=DeviceEntryType.SERVICE,
)