SENSOR: What will be temperature like in X hours

I am using the met.no integration, but I also have open-meteo, and openweathermap.org and would like to create a sensor with the forecasted outside temperature at my location in x hours, e.g. in 15 hours from now. How?

Given “forecast” attribute has been removed, I can’t seem to figure it out. I assume it has to be done with perform_action > weather.get_forecast, but I’m unable to figure it out.

Any help would be hugely appreciated!

In your configuration.yaml file, set up the “Example template sensor using get_forecasts” from the Weather integration docs, but use the following in the state template:

{{ hourly["weather.EXAMPLE"].forecast[14].temperature }}
1 Like

Thank you for the pointer, mate.
I was missing the part that it has to be configured via yaml.

For anyone who might struggle as I did:

The sensor has to be either in configuration.yaml or templates.yaml and should look like this:

- trigger:
    - trigger: time_pattern
      hours: /1
  action:
    - action: weather.get_forecasts
      data:
        type: hourly
      target:
        entity_id: weather.openweathermap
      response_variable: hourly
  sensor:
    - name: "forecast: Feels like in 15 hours"
      unique_id: your_ID
      state: "{{ hourly['weather.openweathermap'].forecast[15].apparent_temperature }}"
      unit_of_measurement: °C

You can try to reload templates, but I had to restart to make it work