mirror of
https://github.com/home-assistant/core.git
synced 2025-06-30 09:57:08 +00:00

* Add binary_sensor platform * Add tests * Remove state attributes * Remove attrs from strings.json * Use base entity class --------- Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
23 lines
589 B
Python
23 lines
589 B
Python
"""Define the IMGW-PIB entity."""
|
|
|
|
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
|
|
|
from .const import ATTRIBUTION
|
|
from .coordinator import ImgwPibDataUpdateCoordinator
|
|
|
|
|
|
class ImgwPibEntity(CoordinatorEntity[ImgwPibDataUpdateCoordinator]):
|
|
"""Define IMGW-PIB entity."""
|
|
|
|
_attr_attribution = ATTRIBUTION
|
|
_attr_has_entity_name = True
|
|
|
|
def __init__(
|
|
self,
|
|
coordinator: ImgwPibDataUpdateCoordinator,
|
|
) -> None:
|
|
"""Initialize."""
|
|
super().__init__(coordinator)
|
|
|
|
self._attr_device_info = coordinator.device_info
|