Multiple arrays of data returned
Hello :)
I'm querying the API at: https://api.glowmarkt.com/api/v0-1/resource/<<MyResourceId>>/readings?from=2024-06-17T00:00:00&to=2024-06-18T23:59:59&period=P1D&offset=-60&function=sum
But I'm struggling to understand why I'm seeing two sets of data returned.
{
"status": "OK",
"name": "electricity consumption",
"query": {
"from": "2024-06-17T00:00:00",
"to": "2024-06-18T23:59:59",
"period": "P1D",
"function": "sum"
},
"data": [
[
1718582400,
14.003
],
[
1718668800,
12.683
]
],
"units": "kWh",
"classifier": "electricity.consumption"
}
Does anyone know why I'm seeing this?
Thanks.
Comments
You have two entries
One at: 1718582400 - which is Mon Jun 17 2024 00:00:00 GMT+0000 (or Mon Jun 17 2024 01:00:00 GMT+0100 in BST) with a value of 14.003 kWh. The second one at: Tue Jun 18 2024 00:00:00 GMT+0000 (Tue Jun 18 2024 01:00:00 GMT+0100) with a value of 12.683 kWh. So that's two day's consumption between 2024-06-17T00:00:00 and 2024-06-18T23:59:59. You asked for the results to be summed so it appears to have done that on a day by day basis.