Restful Sensor Help - Water Usage

I am using a RESTFul Sensor which returns the following JSON object. In the example above, the data for the 12th is shown from approx 10am onward on the 13th until approx 10am on the 14th at which it updates to show data from the 13th.
This pattern applies every day.

{
	"status": "OK",
	"usage": [
		{
			"week": "07 Apr 2024 - 13 Apr 2024",
			"days": [
				{
					"date": "07/04/2024",
					"litre": 0
				},
				{
					"date": "08/04/2024",
					"litre": 0
				},
				{
					"date": "09/04/2024",
					"litre": 0
				},
				{
					"date": "10/04/2024",
					"litre": 0
				},
				{
					"date": "11/04/2024",
					"litre": 0
				},
				{
					"date": "12/04/2024",
					"litre": 235
				}
			],
			"target": "",
			"average": "",
			"tracking": ""
		}
	]
}

I want to build a simple bar chart that shows the date above and the litre use for that day. I have tried putting the date and litres into json_attributes but I then have trouble charting the data because it is stored in attributes.

The other issue I have is the because the data for each date can span across several days due to it not updating at midnight.

My thoughts were to recognise when the data fetched is more than 2 days before the current date then drop that data and not record it - as it is a carryover before 10am. Not even sure if this is possible.

Any ideas appreciated on how to get this working.

If you can just get your sensor into the correct format, you can just add it into the energy dashboard which bnuilds the charts for you (Home Assistant is iike the eveready bunny, it just goes on and on and on, you can add anything to it!)

(I couldn’t fit these screen shots into the same picture)

Getting the data into the correct format is where I am stuck. I’ve tried placing the array of each week into an attribute, and also using json_attributes but I hit limitations or issues each time.

I do plan on adding a CT Clamp soon so the Energy Dashbaord would suit well.

Did you ever figure this out, @nathanashton? I have my cities raw data json as well and want to figure what format HA expects it to be in… I cannot find any guidelines there.

I think I have bad news, my meters are sending the totel number on the meter each time, but the graphs in the energy dashboard are showing the usage. Therefore you may need to send an increasing total so that the logic within the dashboard unravels that to come up with the usage. Are you sending the totals each time (with an increasing number for exacmple each time), or just the amount used each time?

I am just guessing on the above, don’t take it as gospel -