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
14
class
EfergyEntity
(
Entity
):
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.
api
api = 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
)
homeassistant.components.efergy.entity.EfergyEntity
Definition:
entity.py:14
homeassistant.components.efergy.entity.EfergyEntity.__init__
None __init__(self, Efergy api, str server_unique_id)
Definition:
entity.py:19
homeassistant.components.efergy.entity.EfergyEntity.api
api
Definition:
entity.py:21
homeassistant.components.efergy.entity.EfergyEntity._attr_device_info
_attr_device_info
Definition:
entity.py:22
homeassistant.helpers.device_registry.DeviceInfo
Definition:
device_registry.py:98
homeassistant.helpers.entity.Entity
Definition:
entity.py:433
homeassistant.helpers.device_registry
Definition:
device_registry.py:1
homeassistant.helpers.entity
Definition:
entity.py:1
homeassistant.helpers
Definition:
__init__.py:1
core
homeassistant
components
efergy
entity.py
Generated by
1.9.1