Weather template - High, Low and condition

I am tired of looking and trying template that just wont work with get_forecast. Frustrated.

Please does anyone have a premade one that will work with met.no to give me daily high, low and condition.

Sorry to hear that.
Please be sure that we, the readers of your post, are as frustrated by the lack of details regarding your issue/request.

What are you trying to achieve?
What do you have that does not work?

1 Like

Apologies.

I was taking Daily temperature high, Low and weather condition from weather.home (Met.no) to my eink display using state attribute helpers. 2024.3 I believe broke that. I have been trying to figure out how to get this date over again.

Below did not work for me.

template:
  - trigger:
      - platform: time_pattern
        hours: /1
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.forecast_home
        response_variable: daily
    sensor:
      - name: MeteoSwiss Temperature Max Today (user added)
        unique_id: meteoswiss_temperature_max_today_new
        state: "{{ daily['weather.forecast_home'].forecast[0].temperature }}"
        unit_of_measurement: °C        

      - name: MeteoSwiss Temperature Low Today (user added)
        unique_id: meteoswiss_temperature_low_today_new
        state: "{{ daily['weather.forecast_home'].forecast[0].templow }}"
        unit_of_measurement: °C
        
      - name: MeteoSwiss Temperature Max Tomorrow (user added)
        unique_id: meteoswiss_temperature_max_tomorrow_new
        state: "{{ daily['weather.forecast_home'].forecast[1].temperature }}"
        unit_of_measurement: °C        

      - name: MeteoSwiss Temperature Low Tomorrow (user added)
        unique_id: meteoswiss_temperature_low_tomorrow_new
        state: "{{ daily['weather.forecast_home'].forecast[1].templow }}"
        unit_of_measurement: °C
        
      - name: MeteoSwiss Condition Tomorrow (user added)
        unique_id: meteoswiss_weather_condition_tomorrow_new
        state: "{{ daily['weather.forecast_home'].forecast[1].condition }}"

> Blockquote

type or paste code here

Then what is weather.forecast_home, that is in your sensor templates?

What did it do? unknown? Not visible? Errors?

Sorry met.no creates a single entity. weather.forecast_home. (correction on weather.home)

Sensors remain unknown

Works for me.
You realize the first update of the sensors will be on the hour, and not before, right? The “/1” notation doesn’t mean “every 60 minutes”.

You might add a trigger on HA startup to get them populated at start.

I think im getting closer

The below gives me Temperature low but condition and temperature high are not even showing as sensors in entities. Any corrections I need to make ?

template:
  - trigger:
      - platform: homeassistant
        event: start
      - platform: state
        entity_id: weather.forecast_home
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.forecast_home
        response_variable: daily
    sensor:
      - name: Outside Forecast Condition
        icon: mdi:weather-cloudy
        state: "{{ daily['weather.forecast_home'].forecast[0].condition }}"
        attributes:
          forecast: "{{ daily['weather.forecast_home'].forecast }}"
    sensor:
      - name: Outside Temperature High
        state: "{{ daily['weather.forecast_home'].forecast[0].temperature }}"
        attributes:
          forecast: "{{ daily['weather.forecast_home'].forecast }}"
        unit_of_measurement: °C
    sensor:
      - name: Outside Temperature Low
        state: "{{ daily['weather.forecast_home'].forecast[0].templow }}"
        attributes:
          forecast: "{{ daily['weather.forecast_home'].forecast }}"
        unit_of_measurement: °C

sensor: needs to appear only once, like in your original post.

Bingo, that worked ! Thank you