Hello!
I’ve written a simple Puppeteer-driven application that fetches my energy consumption from my power company once every 24 hours. In other words, I will never have any data available on what my current power consumption is, I will only have it after the fact. The power company doesn’t actually show me the data until the day after, so I couldn’t query this faster even if I wanted to.
I want to use this to diff the consumptions of all of my power consumers that I’m measuring with the total consumption, to figure out how much of my total consumption that is coming from sources that I’m not measuring, and also to display historical power consumption for recent dates on a dashboard.
It seems to me like what I want to do is fundamentally misaligned with what a “sensor” in HA does, and that this won’t work since my sensor never has a “current value”, but only historical data.
I’d like to know if I’m correct that this won’t work, and also hear some suggestions on how I can accomplish my goals within HA.
Thanks!
Example data (abbreviated to fit in the post) from my output (but I’m in control of the code for this, so I can reformat it however I want):
[
{
"startDate": "2024-01-12T00:00:00",
"endDate": "2024-01-18T11:17:46.0919075+00:00",
"delta": null,
"unit": "kWh",
"aggregationInterval": "Hourly",
"consumption": [
{
"date": "2024-01-12T00:00:00",
"week": null,
"consumption": 1.363,
"status": null
},
{
"date": "2024-01-12T01:00:00",
"week": null,
"consumption": 0.653,
"status": null
},
{
"date": "2024-01-12T02:00:00",
"week": null,
"consumption": 0.956,
"status": null
},
{
"date": "2024-01-15T23:00:00",
"week": null,
"consumption": 1.11,
"status": null
}
],
"highLoadConsumption": null,
"lowLoadConsumption": null,
"highLoad": null,
"monthlyLoad": null
},
{
"startDate": "2024-01-16T00:00:00",
"endDate": "2024-01-26T10:48:01.6381498+00:00",
"delta": null,
"unit": "kWh",
"aggregationInterval": "Hourly",
"consumption": [
{
"date": "2024-01-16T00:00:00",
"week": null,
"consumption": 1.009,
"status": null
},
{
"date": "2024-01-16T01:00:00",
"week": null,
"consumption": 0.918,
"status": null
},
{
"date": "2024-01-16T02:00:00",
"week": null,
"consumption": 0.99,
"status": null
},
{
"date": "2024-01-16T03:00:00",
"week": null,
"consumption": 1.03,
"status": null
},
{
"date": "2024-01-16T04:00:00",
"week": null,
"consumption": 1.07,
"status": null
},
{
"date": "2024-01-16T05:00:00",
"week": null,
"consumption": 1.124,
"status": null
},
{
"date": "2024-01-16T06:00:00",
"week": null,
"consumption": 1.384,
"status": null
},
{
"date": "2024-01-16T07:00:00",
"week": null,
"consumption": 1.517,
"status": null
},
{
"date": "2024-01-16T08:00:00",
"week": null,
"consumption": 1.479,
"status": null
},
{
"date": "2024-01-16T09:00:00",
"week": null,
"consumption": 1.382,
"status": null
},
{
"date": "2024-01-16T10:00:00",
"week": null,
"consumption": 1.221,
"status": null
},
{
"date": "2024-01-21T01:00:00",
"week": null,
"consumption": 0.945,
"status": null
}
],
"highLoadConsumption": null,
"lowLoadConsumption": null,
"highLoad": null,
"monthlyLoad": null
}
]