hass-core/homeassistant/components/nyt_games/entity.py
Joost Lekkerkerker 1d94e66b9c
Add NYT Games integration (#126449)
* Add NYT Games integration

* Add NYT Games integration

* Add NYT Games integration

* Add NYT Games integration

* Add test
2024-09-23 17:40:19 +02:00

21 lines
712 B
Python

"""Base class for NYT Games entities."""
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
from .coordinator import NYTGamesCoordinator
class NYTGamesEntity(CoordinatorEntity[NYTGamesCoordinator]):
"""Defines a base NYT Games entity."""
_attr_has_entity_name = True
def __init__(self, coordinator: NYTGamesCoordinator) -> None:
"""Initialize a NYT Games entity."""
super().__init__(coordinator)
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, str(coordinator.config_entry.unique_id))},
manufacturer="New York Times",
)