I have a data set containing an hourly solar energy forecast.
It is in an array where each item is a dictionary of dateTime (a time value) and globalRadiation (a numeric value).
I would like to plot time on the X axis against solar energy on the Y axis, so I can see the solar forecast for the coming days/hours.
Is there an existing card that can display future datetime data.
So far I can find historic data display or single value display.
Have a look at this project and the thread about it. I’ve used it for basic HA recorder data and it is fantastic. I’ve not done it, however I am pretty sure the project author created a way to plot arbitrary JSON data. Good hunting!
Can I ask where your data comes from? You seem to have a nice yaml, and is that orginating as a file or a collection of sensors?
I currently have a local server serving my dataset as both .json and .yaml, but HA doesn’t want to take those in through the rest sensor as they’re bigger than 255 char.
taking the thread with some delay as I am struggling to find the right rest / GET setup in my sensor.yaml to gather data from solcast API and build the mentioned forecast graph. Do you have a link towards the “writing code” for such a GET request? I am a bit lost with the json attributes and how to transpose those in the apex chart data generator properly. The 3 hours refreshing time is not the best but the existing limitation for 10 calls a day makes it so for the time being. Thanks for support.
- platform: rest
resource: https://api.solcast.com.au/rooftop_sites/my_site/forecasts?format=json&api_key=my_ key
method: GET
scan_interval: "03:00:00" # limited by 10 calls a day...
name: "Solcast Forecast Data"
unit_of_measurement: kW
force_update: true
value_template: "{{ value_json.forecasts[0].pv_estimate|round(2) }}"