mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Add device to Garage Amsterdam entity (#98573)
This commit is contained in:
parent
7ac2c61f24
commit
80a5e341b5
@ -1,12 +1,13 @@
|
|||||||
"""Generic entity for Garages Amsterdam."""
|
"""Generic entity for Garages Amsterdam."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
|
||||||
from homeassistant.helpers.update_coordinator import (
|
from homeassistant.helpers.update_coordinator import (
|
||||||
CoordinatorEntity,
|
CoordinatorEntity,
|
||||||
DataUpdateCoordinator,
|
DataUpdateCoordinator,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .const import ATTRIBUTION
|
from .const import ATTRIBUTION, DOMAIN
|
||||||
|
|
||||||
|
|
||||||
class GaragesAmsterdamEntity(CoordinatorEntity):
|
class GaragesAmsterdamEntity(CoordinatorEntity):
|
||||||
@ -22,3 +23,8 @@ class GaragesAmsterdamEntity(CoordinatorEntity):
|
|||||||
self._attr_unique_id = f"{garage_name}-{info_type}"
|
self._attr_unique_id = f"{garage_name}-{info_type}"
|
||||||
self._garage_name = garage_name
|
self._garage_name = garage_name
|
||||||
self._info_type = info_type
|
self._info_type = info_type
|
||||||
|
self._attr_device_info = DeviceInfo(
|
||||||
|
identifiers={(DOMAIN, garage_name)},
|
||||||
|
name=garage_name,
|
||||||
|
entry_type=DeviceEntryType.SERVICE,
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user