Here’s how I did it. I created a sensor that runs once an hour and transfers the forecasts to a sensor. Then you can use the forecasts as before.
template:
# Données reçus de Tempest WeatherFlow
# Obtenir les pévisions journalières
- trigger:
- platform: time_pattern
hours: /1
action:
- service: weather.get_forecast
data:
type: daily
target:
entity_id: weather.forecast_shawinigan_sud
response_variable: previsionsjournalieres
sensor:
- name: Prévisions météorologiques journalières
unique_id: previsions_meteorologiques_journalieres
state: "{{ now().isoformat() }}"
icon: mdi:hours-24
attributes:
forecast: "{{ previsionsjournalieres.forecast }}"
# Obtenir les pévisions horaires
- trigger:
- platform: time_pattern
hours: /1
action:
- service: weather.get_forecast
data:
type: hourly
target:
entity_id: weather.shawinigan_sud
response_variable: previsionshoraires
sensor:
- name: Prévisions météorologiques horaires
unique_id: previsions_meteorologiques_horaires
state: "{{ now().isoformat() }}"
icon: mdi:hours-24
attributes:
forecast: "{{ previsionshoraires.forecast }}"
```