1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-27 21:35:48 +00:00
Files
core/homeassistant/components/overseerr/entity.py
Joost Lekkerkerker 268c21addd Add Overseerr integration (#133981)
* Add Overseerr integration

* Add Overseerr integration

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix
2024-12-28 11:50:36 +01:00

23 lines
808 B
Python

"""Base entity for Overseerr."""
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
from .coordinator import OverseerrCoordinator
class OverseerrEntity(CoordinatorEntity[OverseerrCoordinator]):
"""Defines a base Overseerr entity."""
_attr_has_entity_name = True
def __init__(self, coordinator: OverseerrCoordinator, key: str) -> None:
"""Initialize Overseerr entity."""
super().__init__(coordinator)
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, coordinator.config_entry.entry_id)},
entry_type=DeviceEntryType.SERVICE,
)
self._attr_unique_id = f"{coordinator.config_entry.entry_id}-{key}"