Home Assistant Unofficial Reference 2024.12.1
entity.py
Go to the documentation of this file.
1 """Support for AlarmDecoder-based alarm control panels entity."""
2 
3 from homeassistant.helpers.device_registry import DeviceInfo
4 from homeassistant.helpers.entity import Entity
5 
6 from .const import DOMAIN
7 
8 
10  """Define a base AlarmDecoder entity."""
11 
12  _attr_has_entity_name = True
13 
14  def __init__(self, client):
15  """Initialize the alarm decoder entity."""
16  self._client_client = client
17  self._attr_device_info_attr_device_info = DeviceInfo(
18  identifiers={(DOMAIN, client.serial_number)},
19  manufacturer="NuTech",
20  serial_number=client.serial_number,
21  sw_version=client.version_number,
22  )