API¶
KebaKeEnergyAPI(host, username=None, password=None, *, ssl=False, skip_ssl_verification=False, session=None)
¶
An asynchronous client to interact with KEBA KeEnergy API from the Web HMI.
| PARAMETER | DESCRIPTION |
|---|---|
host
|
The hostname or IP adress e.g. ap4400.local
TYPE:
|
username
|
Required for basic auth
TYPE:
|
password
|
Required for basic auth
TYPE:
|
ssl
|
Enable https schema for API URLs
TYPE:
|
skip_ssl_verification
|
Disable SSL verification (required for self-signed certificates)
TYPE:
|
session
|
Add an aiohttp client session
TYPE:
|
Examples:
>>> client = KebaKeEnergyAPI(
>>> host="ap4400.local",
>>> username="test",
>>> password="test",
>>> ssl=True,
>>> skip_ssl_verification=True
>>> )
device_url
property
¶
Get the device URL.
| RETURNS | DESCRIPTION |
|---|---|
str
|
e.g. https://ap4400.local |
read_data(request, position=None, *, human_readable=True, extra_attributes=True)
async
¶
Read multiple data from API with one request.
| PARAMETER | DESCRIPTION |
|---|---|
request
|
Section or a list of sections e.g. [BufferTank.NAME, …]
TYPE:
|
position
|
The number of the installed devices e.g. number of buffer tanks
TYPE:
|
human_readable
|
Return a human-readable string
TYPE:
|
extra_attributes
|
Append the extra attributes to the response
TYPE:
|
Examples:
>>> await client.read_data(
>>> request=[
>>> HeatCircuit.TARGET_TEMPERATURE,
>>> HeatCircuit.TARGET_TEMPERATURE_DAY
>>> ]
>>> )
| RETURNS | DESCRIPTION |
|---|---|
dictionary
|
A dictionary with section as key and reponse data as value |
write_data(request)
async
¶
Write multiple data to API with one request.
| PARAMETER | DESCRIPTION |
|---|---|
request
|
A dictionary with section as key and value to set as a tuple (first index is position 1)
TYPE:
|
Examples:
>>> await client.write_data(
>>> request={
>>> HeatCircuit.TARGET_TEMPERATURE_DAY: (20, None, 5),
>>> HeatCircuit.TARGET_TEMPERATURE_NIGHT: (16,),
>>> }
>>> )
filter_request(request, position=None)
async
¶
Return only available section that are supported by the Web HMI software version.
| PARAMETER | DESCRIPTION |
|---|---|
request
|
Section or a list of sections e.g. [BufferTank.NAME, …]
TYPE:
|
position
|
The number of the installed devices e.g. number of buffer tanks
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
request
|
A list of sections e.g. [BufferTank.NAME, …] |
Examples:
>>> data = await client.filter_request(
>>> request=[
>>> HeatCircuit.TARGET_TEMPERATURE,
>>> HeatCircuit.TARGET_TEMPERATURE_DAY
>>> ]
>>> )