-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
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
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
Labels
No labels