mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
28 lines
891 B
Python
28 lines
891 B
Python
"""BlueprintEntity class."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from homeassistant.helpers.device_registry import DeviceInfo
|
|
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
|
|
|
from .const import ATTRIBUTION
|
|
from .coordinator import BlueprintDataUpdateCoordinator
|
|
|
|
|
|
class IntegrationBlueprintEntity(CoordinatorEntity[BlueprintDataUpdateCoordinator]):
|
|
"""BlueprintEntity class."""
|
|
|
|
_attr_attribution = ATTRIBUTION
|
|
|
|
def __init__(self, coordinator: BlueprintDataUpdateCoordinator) -> None:
|
|
"""Initialize."""
|
|
super().__init__(coordinator)
|
|
self._attr_unique_id = coordinator.config_entry.entry_id
|
|
self._attr_device_info = DeviceInfo(
|
|
identifiers={
|
|
(
|
|
coordinator.config_entry.domain,
|
|
coordinator.config_entry.entry_id,
|
|
),
|
|
},
|
|
)
|