Description
I need the on/off times for a specific device to compare runtime from now to a year ago. Getting the runtimes now is easy with get_all_usage_data() which returns DeviceOn and DeviceOff events.
Are there any options to get the on/off times for a device from a year ago?
The get_all_usage_data method passes a payload to the api. Currently the payload is hardcoded as:
payload = {'n_items': 30}
Is there a parameter that can be passed to the api to get usage data as of a time? I tried modifying the payload to:
payload = {'n_items': 20, 'start': '2020-10-30T16:24:35.314Z'}
with no luck.
It's worth noting that the n_items parameter doesn't do anything. When modified to 20 or 1000 the api still returns 30 results.
Any ideas on how to get historical on/off data by device would be appreciated.