How to use weather.get_forcasts in a helper?

I have a helper that I use to determine if I need to shut the shades on hot days.

I’ve read that get_forecast has been replaced by get_forecasts, but all the examples of using get_forecasts I can find are service calls…

{{
            state_attr('weather.openweathermap', 'forecast') | 
            selectattr('datetime', '>=', utcnow().isoformat()) | 
            selectattr('datetime', '<=',  (utcnow() + timedelta(days=1)).isoformat()) | 
            map(attribute='temperature') | list |max 
}}

How can I write a helper or template to call get_forecasts using openweathermap?

Am I correct in assuming that this mechanism to scan the forecast is being deprecated?

My attempts to RTFM have not enlightened me.
Thanks in advance

Yes, the forecast attribute has been deprecated and will be removed in 2024.3. So you have more than 3 months left to think about your needs and figure out how to use weather.get_forecasts and the response data.

At least for now, you can’t do it directly in a template helper, since they only support state-based sensors. It must be configured in YAML. Trigger-based template sensors now allow an action block that can be used to call the service and return the value.

Trigger-based handling of service response data

Forum Search Results: get_forecasts