Hello,
i use solcast as pv forecast. To trigger automations i need the highest value of today and the timestamp.
My sensor has an array for the forecast.
detailedForecast:
- period_start: '2025-04-15T00:00:00+02:00'
pv_estimate: 0
pv_estimate10: 0
pv_estimate90: 0
- period_start: '2025-04-15T00:30:00+02:00'
pv_estimate: 0
pv_estimate10: 0
pv_estimate90: 0
- period_start: '2025-04-15T01:00:00+02:00'
pv_estimate: 0
pv_estimate10: 0
pv_estimate90: 0
- period_start: '2025-04-15T01:30:00+02:00'
pv_estimate: 0
pv_estimate10: 0
pv_estimate90: 0
....
I created a template to get the max value of today:
{{ state_attr('sensor.solcast_pv_forecast_prognose_heute' , 'detailedForecast')[:48]| map(attribute='pv_estimate')| list | max }}
But how do i get the related timestamp to the value? So that i can see, when the max value is, today?
Second question:
How can i trigger my automation, that it starts when the forecast says, now its the max value?