Home Assistant Unofficial Reference 2024.12.1
entity.py
Go to the documentation of this file.
1 """The Efergy integration."""
2 
3 from __future__ import annotations
4 
5 from pyefergy import Efergy
6 
7 from homeassistant.helpers import device_registry as dr
8 from homeassistant.helpers.device_registry import DeviceInfo
9 from homeassistant.helpers.entity import Entity
10 
11 from .const import DEFAULT_NAME, DOMAIN
12 
13 
15  """Representation of a Efergy entity."""
16 
17  _attr_attribution = "Data provided by Efergy"
18 
19  def __init__(self, api: Efergy, server_unique_id: str) -> None:
20  """Initialize an Efergy entity."""
21  self.apiapi = api
22  self._attr_device_info_attr_device_info = DeviceInfo(
23  configuration_url="https://engage.efergy.com/user/login",
24  connections={(dr.CONNECTION_NETWORK_MAC, api.info["mac"])},
25  identifiers={(DOMAIN, server_unique_id)},
26  manufacturer=DEFAULT_NAME,
27  name=DEFAULT_NAME,
28  model=api.info["type"],
29  sw_version=api.info["version"],
30  )
None __init__(self, Efergy api, str server_unique_id)
Definition: entity.py:19