Home Assistant Unofficial Reference 2024.12.1
entity.py
Go to the documentation of this file.
1 """APsystems base entity."""
2 
3 from __future__ import annotations
4 
5 from homeassistant.helpers.device_registry import DeviceInfo
6 from homeassistant.helpers.entity import Entity
7 
8 from . import ApSystemsData
9 from .const import DOMAIN
10 
11 
13  """Defines a base APsystems entity."""
14 
15  _attr_has_entity_name = True
16 
17  def __init__(
18  self,
19  data: ApSystemsData,
20  ) -> None:
21  """Initialize the APsystems entity."""
22  self._attr_device_info_attr_device_info = DeviceInfo(
23  identifiers={(DOMAIN, data.device_id)},
24  serial_number=data.device_id,
25  manufacturer="APsystems",
26  model="EZ1-M",
27  )