Skip to content

Adax integration - missing power consuption reporting #6

@Tom-ahawk

Description

@Tom-ahawk

Looks like HA-Adaxs cloud integration does report power consumption. This is missing from the HA integration, while Homey has this functionality.

Please, if possible, implement this in HA integration

Image

def get_energy_info(token, roomId):
headers = { "Authorization": "Bearer " + token }
response = requests.get(API_URL + "/rest/v1/energy_log/" + str(roomId), headers = headers)
json = response.json()
for log in json['points']:
fromTime = datetime.datetime.utcfromtimestamp(int(log['fromTime']) / 1000).strftime('%Y-%m-%d %H:%M:%S')
toTime = datetime.datetime.utcfromtimestamp(int(log['toTime']) / 1000).strftime('%Y-%m-%d %H:%M:%S')
energy = log['energyWh'];
print("From: %15s, To: %15s, %5dwh" % (fromTime, toTime, energy))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions