hass-core/homeassistant/components/imgw_pib/entity.py
Maciej Bieniek 37d9ed899d
Add binary_sensor platform to IMGW-PIB integration (#116624)
* 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>
2024-05-02 16:16:26 +02:00

22 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