How to create a forecast entity from a weather report in .xml?

I’m having trouble understanding what to do. I’ll try to reread these messages tomorrow. I’m not a programmer, and my English isn’t very strong, so both things together are really confusing me.

In this post, you created:

weather:
  - platform: template
    name: Meteo ARPAV
    condition_template: "{{ states('sensor.arpav_simbolo1') }}"
    temperature_template: "{{ states('sensor.arpav_temperatura1') }}"
    humidity_template: "{{ states('sensor.giardino_umidita') }}"
    forecast_daily_template: "{{ states('sensor.forecast_arpav') }}"
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The forecast_daily_template is set to the state of your template sensor.forecast_arpav. That won’t work. You need to put the template directly into the weather entity instead, like this:

weather:
  - platform: template
    name: Meteo ARPAV
    condition_template: "{{ states('sensor.arpav_simbolo1') }}"
    temperature_template: "{{ states('sensor.arpav_temperatura1') }}"
    humidity_template: "{{ states('sensor.giardino_umidita') }}"
    forecast_daily_template: >
      {% set ns = namespace(forecast=[]) %}
      {% set simbolo = states('sensor.arpav_simbolo1') %}
      {% set temperatura = states('sensor.arpav_temperatura1') %}
      {% set precipitazioni = states('sensor.arpav_precipitazioni1') %}
      {% set probabilita_precipitazioni = states('sensor.arpav_probabilita1')|replace('%','') %}
      {% set cielo = states('sensor.arpav_cielo2') %}
      etc...

The state of a sensor is an up-to-255 character string, but you need a complex object.

Work on your template in the editor so that it produces an output with a structure exactly like the example in my post above, then copy that template into your weather entity.

I @Troon I have several doubts so I try to report them separately on each point to ask for your help to solve them:

regarding the rain, the ARPAV station gives me two different data:

<previsione title="Precipitazioni" type="text" value="Generalmente assenti"/>
<previsione title="Probabilita' precipitazione" type="text" value="0%"/>

(precipitation percentage and precipitation probability with a text.)
Can Weather handle both? It seems like a duplicate of the same thing, maybe I could just use the probability?

I get the data with this rest

  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_probabilita0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[4]['@value'] | default('Valore non disponibile') }}"
    scan_interval: 600
{% set precipitazioni = states('sensor.arpav_probabilita1')|replace('%','') %}

Well, the result could be this: my doubts written in the code after the # symbol

weather:
  - platform: template
    name: Meteo ARPAV
    condition_template: "{{ states('sensor.arpav_simbolo0') }}"
    temperature_template: "{{ states('sensor.arpav_temperatura0') }}"
    humidity_template: "{{ states('sensor.giardino_umidita') }}"
    forecast_daily_template: >
      {% set ns = namespace(forecast=[]) %}
      {% set simbolo = states('sensor.arpav_simbolo1') %}
      {% set temperatura = states('sensor.arpav_temperatura1') %}
      {% set precipitazioni = states('sensor.arpav_precipitazioni1') %} #Could I eliminate one of these two entities?
      {% set probabilita_precipitazioni = states('sensor.arpav_probabilita1')|replace('%','') %} #Could I eliminate one of these two entities?
      {% set cielo = states('sensor.arpav_cielo1') %}
      {% if simbolo != 'unavailable' and temperatura != 'unavailable' %}
            {% set tsd = {
              'datetime': now().isoformat(),
              'condition': simbolo,
              'temperature': temperatura,
              'precipitation_probability': probabilita_precipitazioni, #Could I eliminate one of these two entities?
              'precipitation': precipitazioni, #Could I eliminate one of these two entities?
              'sky_condition': cielo
            } %}
            {% set ns.forecast = ns.forecast + [tsd] %}
          {% endif %}
          
          {{ ns.forecast }}

I don’t have any other important information, only
“snow level”
“reliability”
which I don’t think makes sense to include, so that code could be ok?
i think NO! I don’t know what’s wrong, Only the current weather always appears, nothing about future forecasts
image

If this is the weather code,
all the template code I had done before, and that I had put in my package file, do I have to delete it? I’m talking about this:

  - platform: template
    sensors:
      forecast_arpav:
        friendly_name: "Forecast ARPAV"
        unique_id: forecast_arpav
        value_template: >
          {% set ns = namespace(forecast=[]) %}
          {% set simbolo = states('sensor.arpav_simbolo1') %}
          {% set temperatura = states('sensor.arpav_temperatura1') %}
          {% set precipitazioni = states('sensor.arpav_precipitazioni1') %}
          {% set probabilita_precipitazioni = states('sensor.arpav_probabilita1') %}
          {% set cielo = states('sensor.arpav_cielo2') %}
          
          {% if simbolo != 'unavailable' and temperatura != 'unavailable' %}
            {% set tsd = {
              'datetime': now().isoformat(),
              'condition': simbolo,
              'temperature': temperatura,
              'precipitation_probability': probabilita_precipitazioni,
              'precipitation': precipitazioni,
              'sky_condition': cielo
            } %}
            {% set ns.forecast = ns.forecast + [tsd] %}
          {% endif %}
          
          {{ ns.forecast }}

I deleted it from my package file, did I do it right? It’s not clear to me if it was needed or not.

at this point, I entered the forecasts with all my sensors with the final “1”. I didn’t understand how to manage the others.
Let me explain better, ARPAV issues a bulletin with “current” data that I mapped with the number “0” then divided into 5 half days and 2 last full days.

Obtaining a widget of this type:
!ARPAV!

surely using templates I should create a structure to call the correct sensor based on the time of day, and this will be another obstacle to overcome. But first I have to understand how to insert the data of the following days.

This is my current situation, the weather sees the current forecasts but none of the future ones. Among other things, due to a time problem, every morning it sees the forecasts of the evening before, as well as the original ARPAV widget, until a new bulletin is issued at 13:00, but I could also fix that with a template at a later time, first I have to understand how to get the other forecasts though. I hope this long message of mine can explain my doubts well and what I have managed to do so far.

edit: I managed to play with the current weather to solve the problem of symbol and correct temperature, changing sensors to use based on how many hours have passed since the bulletin was released, but my doubts remain on how to make future forecasts

weather:
  - platform: template
    name: Meteo ARPAV
    condition_template: >
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %}
      {% set current_time = as_timestamp(now()) %}
      {% set hours_passed = (current_time - emission_time) / 3600 %}
      {% if hours_passed < 12 %}
        {{ states('sensor.arpav_simbolo0') }}
      {% elif 12 <= hours_passed < 24 %}
        {{ states('sensor.arpav_simbolo1') }}
      {% else %}
        'unavailable'
      {% endif %}
    temperature_template: >
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %}
      {% set current_time = as_timestamp(now()) %}
      {% set hours_passed = (current_time - emission_time) / 3600 %}
      {% if hours_passed < 12 %}
        {{ states('sensor.arpav_temperatura0') }}
      {% elif 12 <= hours_passed < 24 %}
        {{ states('sensor.arpav_temperatura1') }}
      {% else %}
        'unavailable'
      {% endif %}
    humidity_template: "{{ states('sensor.giardino_umidita') }}"
    forecast_daily_template: >
      {% set ns = namespace(forecast=[]) %}
      {% set simbolo = states('sensor.arpav_simbolo1') %}
      {% set temperatura = states('sensor.arpav_temperatura1') %}
      {% set precipitazioni = states('sensor.arpav_precipitazioni1') %} 
      {% set probabilita_precipitazioni = states('sensor.arpav_probabilita1')|replace('%','') %}
      {% set cielo = states('sensor.arpav_cielo1') %}
      {% if simbolo != 'unavailable' and temperatura != 'unavailable' %}
        {% set tsd = {
          'datetime': now().isoformat(),
          'condition': simbolo,
          'temperature': temperatura,
          'precipitation_probability': probabilita_precipitazioni, 
          'precipitation': precipitazioni,
          'sky_condition': cielo
        } %}
        {% set ns.forecast = ns.forecast + [tsd] %}
      {% endif %}
      {{ ns.forecast }}

image
just to tell you that after a lot of testing, something finally appeared!
All wrong as a division of the days, there is still a lot of work, but at least I made a small step forward.
this is the code:

weather:
  - platform: template
    name: Meteo ARPAV
    condition_template: >
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %}
      {% set current_time = as_timestamp(now()) %}
      {% set hours_passed = (current_time - emission_time) / 3600 %}
      {% if hours_passed < 12 %}
        {{ states('sensor.arpav_simbolo0') }}
      {% elif 12 <= hours_passed < 24 %}
        {{ states('sensor.arpav_simbolo1') }}
      {% else %}
        'unavailable'
      {% endif %}
    temperature_template: >
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %}
      {% set current_time = as_timestamp(now()) %}
      {% set hours_passed = (current_time - emission_time) / 3600 %}
      {% if hours_passed < 12 %}
        {{ states('sensor.arpav_temperatura0') }}
      {% elif 12 <= hours_passed < 24 %}
        {{ states('sensor.arpav_temperatura1') }}
      {% else %}
        'unavailable'
      {% endif %}
    humidity_template: "{{ states('sensor.giardino_umidita') }}"
    forecast_daily_template: >
        {% set ns = namespace(forecast=[]) %}
        
        {# Calcola il tempo di emissione e il tempo attuale #}
        {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %}
        {% set current_time = as_timestamp(now()) %}
        {% set hours_passed = (current_time - emission_time) / 3600 %}

        {# Inizializza i simboli e le temperature per i prossimi intervalli #}
        {% for i in range(0, 7) %}
            {% set simbolo = states('sensor.arpav_simbolo' ~ i) %}
            {% set temperatura = states('sensor.arpav_temperatura' ~ i) %}
            {% set probabilita_precipitazioni = states('sensor.arpav_probabilita' ~ i) | replace('%', '') %}

            {# Aggiungi i dati alla previsione solo se simbolo e temperatura sono disponibili #}
            {% if simbolo != 'unavailable' and temperatura != 'unavailable' %}
                {% set tsd = {
                    'datetime': (now() + timedelta(hours=i * 6)).isoformat(),
                    'condition': simbolo,
                    'temperature': temperatura,
                    'precipitation_probability': probabilita_precipitazioni,
                    'is_daytime': true if (now().hour + i * 6) < 13 else false
                } %}
                {% set ns.forecast = ns.forecast + [tsd] %}
            {% endif %}
        {% endfor %}
        
        {{ ns.forecast }}

I need to figure out how to get these day splits instead of daily or half day or hourly.
Friday 18th afternoon/evening
Saturday 19th night/morning
Saturday 19th afternoon/evening
Sunday 20th night/morning
Sunday 20th afternoon/evening
Monday 21st all day
Tuesday 22nd all day
Thanks again for the support so far

1 Like

image

This is the code of the Weather (not the end)
There is still some work to be done on temperature and precipitation, but I am happy to have finally obtained something sensible. I have to thank infinitely @Troon for the help, and chat gpt for generating many parts unknown to me, but after long conversations she and I found the right direction

weather:
  - platform: template
    name: Meteo ARPAV
    condition_template: >
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %}
      {% set current_time = as_timestamp(now()) %}
      {% set hours_passed = (current_time - emission_time) / 3600 %}
      {% if hours_passed < 12 %}
        {{ states('sensor.arpav_simbolo0') }}
      {% elif 12 <= hours_passed < 24 %}
        {{ states('sensor.arpav_simbolo1') }}
      {% else %}
        'unavailable'
      {% endif %}
    temperature_template: >
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %}
      {% set current_time = as_timestamp(now()) %}
      {% set hours_passed = (current_time - emission_time) / 3600 %}
      {% if hours_passed < 12 %}
        {{ states('sensor.arpav_temperatura0') }}
      {% elif 12 <= hours_passed < 24 %}
        {{ states('sensor.arpav_temperatura1') }}
      {% else %}
        'unavailable'
      {% endif %}
    humidity_template: "{{ states('sensor.giardino_umidita') }}"
    forecast_daily_template: >
      {% set ns = namespace(forecast=[]) %}
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %}
      {% set time_ref = emission_time %}
      
      {% set offsets = [0, 12, 24, 36, 48] %}
      {% for i in range(0, 5) %}
        {% set forecast_time = time_ref + (offsets[i] * 3600) %}
        {% set simbolo = states('sensor.arpav_simbolo' ~ i) %}
        {% set temperatura = states('sensor.arpav_temperatura' ~ i) %}
        {% set hour = '13:00:00' if i % 2 == 0 else '01:00:00' %}
        
        {% set tsd = {
          'datetime': (forecast_time | timestamp_custom('%Y-%m-%dT')) ~ hour,
          'condition': simbolo,
          'temperature': temperatura,
          'precipitation_probability': 'unknown'
        } %}
        
        {% set ns.forecast = ns.forecast + [tsd] %}
      {% endfor %}
      
      {% for i in range(5, 7) %}
        {% set forecast_time = time_ref + ((60 + (i - 5) * 24) * 3600) %}
        {% set simbolo = states('sensor.arpav_simbolo' ~ i) %}
        {% set temperatura = 'unknown' %}
        
        {% set tsd = {
          'datetime': (forecast_time | timestamp_custom('%Y-%m-%dT13:00:00')),
          'condition': simbolo,
          'temperature': temperatura,
          'precipitation_probability': 'unknown'
        } %}
        
        {% set ns.forecast = ns.forecast + [tsd] %}
      {% endfor %}
      
      {{ ns.forecast }}

“Nothing works; the half-day forecasts do not appear, and I can’t even see the maximum and minimum temperatures for the same day, so many cards are not functioning properly. If you have any advice after looking at my code, I would be grateful.”

weather:
  - platform: template
    name: Meteo ARPAV
    condition_template: >
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %} 
      {% set current_time = as_timestamp(now()) %} 
      {% set hours_passed = (current_time - emission_time) / 3600 %} 
      {% if hours_passed < 12 %} 
        {{ states('sensor.arpav_simbolo0') }} 
      {% elif 12 <= hours_passed < 24 %} 
        {{ states('sensor.arpav_simbolo1') }} 
      {% else %} 
        'unavailable' 
      {% endif %}
    temperature_template: >
      {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %} 
      {% set current_time = as_timestamp(now()) %} 
      {% set hours_passed = (current_time - emission_time) / 3600 %} 
      {% if hours_passed < 12 %} 
        {{ states('sensor.arpav_temperatura0') }} 
      {% elif 12 <= hours_passed < 24 %} 
        {{ states('sensor.arpav_temperatura1') }} 
      {% else %} 
        'unavailable' 
      {% endif %}
    humidity_template: "{{ states('sensor.giardino_umidita') }}"
    
    forecast_daily_template: >
        {% set ns = namespace(forecast=[]) %} 
        {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %} 
        {% set time_ref = emission_time %} 
        {% set offsets = [0, 12, 24, 36, 48] %} 
        {% for i in range(0, 5) %} 
            {% set forecast_time = time_ref + (offsets[i] * 3600) %} 
            {% set simbolo = states('sensor.arpav_simbolo' ~ i) %} 
            {% set temperatura = states('sensor.arpav_temperatura' ~ i) %} 

            {% set temperatura_minima = 'N/A' %}
            {% set temperatura_massima = 'N/A' %}
            
            {% if i > 0 and states('sensor.arpav_temperatura' ~ (i - 1)) != 'unknown' %}
                {% set temperatura_minima = states('sensor.arpav_temperatura' ~ (i - 1)) %}
            {% endif %}
            
            {% if i < 4 and states('sensor.arpav_temperatura' ~ (i + 1)) != 'unknown' %}
                {% set temperatura_massima = states('sensor.arpav_temperatura' ~ (i + 1)) %}
            {% endif %}
            
            {% set tsd = { 
                'datetime': (forecast_time | timestamp_custom('%Y-%m-%dT')) ~ ('13:00:00' if i % 2 == 0 else '01:00:00'), 
                'condition': simbolo, 
                'temperature': temperatura, 
                'temperature_max': temperatura_massima,  
                'temperature_min': temperatura_minima,    
                'precipitation_probability': 'unknown' 
            } %} 
            
            {% set ns.forecast = ns.forecast + [tsd] %} 
        {% endfor %}
        
        {{ ns.forecast }}
        
    forecast_hourly_template: >
        {% set ns = namespace(forecast=[]) %} 
        {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %} 
        {% set time_ref = emission_time %} 
        {% set offsets = [0, 12, 24, 36, 48, 72, 84] %} 
        {% for i in range(0, 7) %}
            {% set forecast_time = time_ref + (offsets[i] * 3600) %} 
            {% set simbolo = states('sensor.arpav_simbolo' ~ i) %} 
            
            {% if i < 5 %}
                {% set temperatura = states('sensor.arpav_temperatura' ~ i) %} 
            {% else %}
                {% set temperatura = 'N/A' %}  # Valore predefinito per i sensori non disponibili
            {% endif %}
            
            {% set tsd = { 
                'datetime': (forecast_time | timestamp_custom('%Y-%m-%dT%H:%M:%S')), 
                'condition': simbolo, 
                'temperature': temperatura, 
                'precipitation_probability': 'unknown' 
            } %} 
            
            {% set ns.forecast = ns.forecast + [tsd] %} 
        {% endfor %}
        
        {{ ns.forecast }}
        
    forecast_twice_daily_template: >
        {% set ns = namespace(forecast=[]) %} 
        {% set emission_time = as_timestamp(states('sensor.arpav_bollettino_emissione')) %} 
        {% set time_ref = emission_time %} 
        {% set offsets = [0, 12] %}  # Due offset per la previsione

        {% for i in range(0, 2) %}  # Cambiato a 2 per evitare l'errore
            {% set forecast_time = time_ref + (offsets[i] * 3600) %} 
            {% set simbolo = states('sensor.arpav_simbolo' ~ i) %} 
            {% set temperatura = states('sensor.arpav_temperatura' ~ i) %} 
            {% set hour = '00:00:00' if i % 2 == 0 else '12:00:00' %} 
            
            {% set tsd = { 
                'datetime': (forecast_time | timestamp_custom('%Y-%m-%dT')) ~ hour, 
                'condition': simbolo, 
                'temperature': temperatura, 
                'precipitation_probability': 'unknown' 
            } %} 
            
            {% set ns.forecast = ns.forecast + [tsd] %} 
        {% endfor %}
        
        {{ ns.forecast }}

Diego,
your effort is amazing and the result also.

I don’ t understand if you can use the forecast as a trigger in the automation.

I’m making the same job for Meteored api v2, but some weather icones o temperatures doe not apear.

weather icones does not apear here
Captura desde 2024-10-25 15-36-10
and here
Captura desde 2024-10-25 15-35-57

temperatures does not apear here :
Captura desde 2024-10-25 15-35-41

Here is my code, can someone help me ?

weather:
  - platform: template
    name: "Meteored"
    condition_template: >
        {% set nowtime = now() %}
        {% set hour = as_timestamp(now()) | timestamp_custom('%H') %}
        {% set condition_text = states('sensor.wthr_today_'+hour+'h_logo') %}
        {% if '1' in condition_text %}
          {% set sunrise = state_attr('sun.sun', 'next_rising')|as_datetime|as_local %}
          {% set sunset = state_attr('sun.sun', 'next_setting')|as_datetime|as_local %}
          {% set pre_sunrise = (sunrise - timedelta(hours=1)).time() %}
          {% set pre_sunset = (sunset - timedelta(hours=1)).time() %}
          {% set t = now().time() %}    
          {% if pre_sunrise <= t < pre_sunset %} 
            sunny
          {% else %} 
            clear-night
          {% endif %}
        {% elif '2' in condition_text %}
            partlycloudy
        {% elif '3' in condition_text %}
            cloudy
        {% elif '4' in condition_text %}
            cloudy
        {% elif '5' in condition_text %}
            rainy
        {% elif '6' in condition_text %}
            rainy
        {% elif '7' in condition_text %}
            rainy
        {% elif '8' in condition_text %}
            pouring
        {% elif '9' in condition_text %}
            pouring
        {% elif '10' in condition_text %}
            pouring
        {% elif '11' in condition_text %}
            lightning-rainy
        {% elif '12' in condition_text %}
            lightning-rainy
        {% elif '13' in condition_text %}
            lightning-rainy
        {% elif '14' in condition_text %}
            hail
        {% elif '15' in condition_text %}
            hail
        {% elif '16' in condition_text %}
            hail
        {% elif '17' in condition_text %}
            snowy
        {% elif '18' in condition_text %}
            snowy
        {% elif '19' in condition_text %}
            snowy
        {% elif '20' in condition_text %}
            snowy-rainy
        {% elif '21' in condition_text %}
            snowy-rainy
        {% elif '22' in condition_text %}
            snowy-rainy
        {% else %}
            unknown
        {% endif %}
    temperature_template: "{{ states('sensor.wthr_today_'+hour+'h_temp') | float }}"
    humidity_template: "{{ states('sensor.wthr_today_'+hour+'h_humidity') | float }}"
    pressure_template: "{{ states('sensor.wthr_today_'+hour+'h_pressure') | float }}"
    wind_speed_template: "{{ states('sensor.wthr_today_'+hour+'h_wind') | float }}"
    wind_gust_speed_template: "{{ states('sensor.wthr_today_'+hour+'h_wind_gust') | float }}"
    forecast_daily_template: >
        {% set ns = namespace(forecast=[]) %}
        {% set days=["today","tomorrow","day3","day4","day5"] %}
        {% for day in days %}
            {% set date = as_datetime(as_timestamp(states('sensor.wthr_'+day+'_date')),'%Y%m%d') %}
            {% set cloud_coverage = states('sensor.wthr_'+day+'_description') %}
            {% set condition_text = states('sensor.wthr_'+day+'_logo') %}
            {% if '1' in condition_text %}
               {% set condition = "sunny" %}
            {% elif '2' in condition_text %}
               {% set condition = "partly cloudy" %}
            {% elif '3' in condition_text %}
               {% set condition = "cloudy" %}
            {% elif '4' in condition_text %}
               {% set condition = "cloudy" %}
            {% elif '5' in condition_text %}
               {% set condition = "rainy" %} 
            {% elif '6' in condition_text %}
               {% set condition = "rainy" %}
            {% elif '7' in condition_text %}
               {% set condition = "rainy" %} 
            {% elif '8' in condition_text %}
               {% set condition = "pouring" %}
            {% elif '9' in condition_text %}
               {% set condition = "pouring" %}
            {% elif '10' in condition_text %}
               {% set condition = "pouring" %}
            {% elif '11' in condition_text %}
               {% set condition = "lightning-rainy" %}
            {% elif '12' in condition_text %}
               {% set condition = "lightning-rainy" %}
            {% elif '13' in condition_text %}
               {% set condition = "lightning-rainy" %}
            {% elif '14' in condition_text %}
               {% set condition = "hail" %}
            {% elif '15' in condition_text %}
               {% set condition = "hail" %}
            {% elif '16' in condition_text %}
               {% set condition = "hail" %}
            {% elif '17' in condition_text %}
               {% set condition = "snowy" %}" %}
            {% elif '18' in condition_text %}
               {% set condition = "snowy" %}
            {% elif '19' in condition_text %}
               {% set condition = "snowy" %}
            {% elif '20' in condition_text %}
               {% set condition = "snowy-rainy" %}
            {% elif '21' in condition_text %}
               {% set condition = "snowy-rainy" %}
            {% elif '22' in condition_text %}
               {% set condition = "snowy-rainy" %}
            {% else %}
                {% set condition = "unknown" %}
            {% endif %}
            {% set humidity = states('sensor.wthr_'+day+'_humidity') %}
            {% set precipitation = states('sensor.wthr_'+day+'_rain') %}
            {% set pressure = states('sensor.wthr_'+day+'_pressure') %}
            {% set temperature = states('sensor.wthr_'+day+'_temp_max') %}
            {% set templow = states('sensor.wthr_'+day+'_temp_min') %}
            {% set wind_speed = states('sensor.wthr_'+day+'_wind') %}
            {% set wind_gust_speed = states('sensor.wthr_'+day+'_wind_gust') %}
            {% set uv_index = states('sensor.wthr_'+day+'_uv_max') %}
            {% if condition != 'unavailable' and temperature != 'unavailable' %}
                {% set tsd = {
                  'datetime': date.isoformat(),
                  'condition': condition,
                  'humidity': humidity,
                  'precipitation': precipitation,
                  'pressure': pressure,
                  'temperature': temperature,
                  'templow': templow,
                  'wind_speed': wind_speed,
                  'wind_gust_speed': wind_gust_speed,
                  'uv_index': uv_index
                } %}
                {% set ns.forecast = ns.forecast + [tsd] %}
            
            {% endif %}
        {% endfor %}  
        {{ ns.forecast }}
    forecast_hourly_template: >
        {% set ns = namespace(forecast=[]) %}
        {% set days=["today","tomorrow","day3","day4","day5"] %}
        {% set hours=["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"] %}
        {% for day in days %}
            {% for hour in hours %}
                {% set date = as_datetime(as_timestamp(states('sensor.wthr_'+day+'_date')+' '+hour+'00'),'%Y%m%d %H%M') %}
                {% set cloud_coverage = states('sensor.wthr_'+day+'_'+hour+'h_clouds') %}
                {% set condition_text = states('sensor.wthr_'+day+'_'+hour+'h_logo') %}
                {% if '1' in condition_text %}
                   {% set condition = "sunny" %}
                {% elif '2' in condition_text %}
                   {% set condition = "partly cloudy" %}
                {% elif '3' in condition_text %}
                   {% set condition = "cloudy" %}
                {% elif '4' in condition_text %}
                   {% set condition = "cloudy" %}
                {% elif '5' in condition_text %}
                   {% set condition = "rainy" %} 
                {% elif '6' in condition_text %}
                   {% set condition = "rainy" %}
                {% elif '7' in condition_text %}
                   {% set condition = "rainy" %} 
                {% elif '8' in condition_text %}
                   {% set condition = "pouring" %}
                {% elif '9' in condition_text %}
                   {% set condition = "pouring" %}
                {% elif '10' in condition_text %}
                   {% set condition = "pouring" %}
                {% elif '11' in condition_text %}
                   {% set condition = "lightning-rainy" %}
                {% elif '12' in condition_text %}
                   {% set condition = "lightning-rainy" %}
                {% elif '13' in condition_text %}
                   {% set condition = "lightning-rainy" %}
                {% elif '14' in condition_text %}
                   {% set condition = "hail" %}
                {% elif '15' in condition_text %}
                   {% set condition = "hail" %}
                {% elif '16' in condition_text %}
                   {% set condition = "hail" %}
                {% elif '17' in condition_text %}
                   {% set condition = "snowy" %}" %}
                {% elif '18' in condition_text %}
                   {% set condition = "snowy" %}
                {% elif '19' in condition_text %}
                   {% set condition = "snowy" %}
                {% elif '20' in condition_text %}
                   {% set condition = "snowy-rainy" %}
                {% elif '21' in condition_text %}
                   {% set condition = "snowy-rainy" %}
                {% elif '22' in condition_text %}
                   {% set condition = "snowy-rainy" %}
                {% else %}
                   {% set condition = "unknown" %}
                {% endif %}
                {% set humidity = states('sensor.wthr_'+day+'_'+hour+'h_humidity') %}
                {% set precipitation = states('sensor.wthr_'+day+'_'+hour+'h_rain') %}
                {% set pressure = states('sensor.wthr_'+day+'_'+hour+'h_pressure') %}
                {% set temperature = states('sensor.wthr_'+day+'_'+hour+'h_temp') %}
                {% set apparent_temperature = states('sensor.wthr_'+day+'_'+hour+'h_windchill') %}
                {% set wind_speed = states('sensor.wthr_'+day+'_'+hour+'h_wind') %}
                {% set wind_bearing = states('sensor.wthr_'+day+'_'+hour+'h_wind_direction') %}
                {% set wind_gust_speed = states('sensor.wthr_'+day+'_'+hour+'h_wind_gust') %}
                {% set uv_index = states('sensor.wthr_'+day+'_'+hour+'h_uv') %}
                {% if condition != 'unknown'%}
                    {% set tsd = {
                      'datetime': date.isoformat(),
                      'cloud_coverage': cloud_coverage,
                      'condition':condition,
                      'humidity': humidity,
                      'precipitation': precipitation,
                      'pressure': pressure,
                      'temperature': temperature,
                      'apparent_temperature': apparent_temperature,
                      'wind_speed': wind_speed,
                      'wind_bearing': wind_bearing,
                      'wind_gust_speed': wind_gust_speed,
                      'uv_index': uv_index
                    } %}
                    {% set ns.forecast = ns.forecast + [tsd] %}
                {% endif %}
            {% endfor %}  
        {% endfor %}  
        {{ ns.forecast }}

and the restful sensor creation:

rest:
    scan_interval: 1800
    resource: "http://api.meteored.cl/index.php?api_lang=cl&localidad=18013&affiliate_id=XXXXXXXXXXXXXXXXXX&v=2.0&h=1"
    sensor:
      - name: "wthr today date"
        value_template: "{{ value_json['report']['location']['day'][0]['@value']}}"
      - name: "wthr today name"
        value_template: "{{ value_json['report']['location']['day'][0]['@name']}}"
      - name: "wthr today logo"
        value_template: "{{ value_json['report']['location']['day'][0]['symbol']['@value']}}"
      - name: "wthr today description"
        value_template: "{{ value_json['report']['location']['day'][0]['symbol']['@desc']}}"
      - name: "wthr today temp-min"
        value_template: "{{ value_json['report']['location']['day'][0]['tempmin']['@value']}}"
        unit_of_measurement: "°C"
      - name: "wthr today temp-max"
        value_template: "{{ value_json['report']['location']['day'][0]['tempmax']['@value']}}"
        unit_of_measurement: "°C"
      - name: "wthr today wind"
        value_template: "{{ value_json['report']['location']['day'][0]['wind']['@value']}}"
        device_class: "wind_speed"
        unit_of_measurement: "km/h"
      - name: "wthr today wind-symbol"
        value_template: "{{ value_json['report']['location']['day'][0]['wind']['@symbol']}}"
      - name: "wthr today wind-symbolB"
        value_template: "{{ value_json['report']['location']['day'][0]['wind']['@symbolB']}}"
        device_class: "wind_speed"
        unit_of_measurement: "km/h"
      - name: "wthr today wind-gust"
        value_template: "{{ value_json['report']['location']['day'][0]['wind-gust']['@value']}}"
        device_class: "wind_speed"
        unit_of_measurement: "km/h"
      - name: "wthr today rain"
        value_template: "{{ value_json['report']['location']['day'][0]['rain']['@value']}}"
        device_class: "precipitation"
        unit_of_measurement: "mm"
      - name: "wthr today humidity"
        value_template: "{{ value_json['report']['location']['day'][0]['humidity']['@value']}}"
        device_class: "humidity"
        unit_of_measurement: "%"
      - name: "wthr today pressure"
        value_template: "{{ value_json['report']['location']['day'][0]['pressure']['@value']}}"
        device_class: "atmospheric_pressure"
        unit_of_measurement: "mbar"
      - name: "wthr today snowline"
        value_template: "{{ value_json['report']['location']['day'][0]['snowline']['@value']}}"
        unit_of_measurement: "m"
      - name: "wthr today uv-max"
        value_template: "{{ value_json['report']['location']['day'][0]['uv_index_max']['@value']}}"
      - name: "wthr today sun in"
        value_template: "{{ value_json['report']['location']['day'][0]['sun']['@in']}}"
      - name: "wthr today sun mid"
        value_template: "{{ value_json['report']['location']['day'][0]['sun']['@mid']}}"
      - name: "wthr today sun out"
        value_template: "{{ value_json['report']['location']['day'][0]['sun']['@out']}}"
      - name: "wthr today moon name"
        value_template: "{{ value_json['report']['location']['day'][0]['moon']['@desc']}}"
      - name: "wthr today moon symbol"
        value_template: "{{ value_json['report']['location']['day'][0]['moon']['@symbol']}}"
      - name: "wthr today moon lumi"
        value_template: "{{ value_json['report']['location']['day'][0]['moon']['@lumi']}}"
      - name: "wthr today moon in"
        value_template: "{{ value_json['report']['location']['day'][0]['moon']['@in']}}"
      - name: "wthr today moon out"
        value_template: "{{ value_json['report']['location']['day'][0]['moon']['@out']}}"

      - name: "wthr today 01h temp"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['temp']['@value']}}"
        device_class: "temperature"
        unit_of_measurement: "ºC"
      - name: "wthr today 01h logo"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['symbol']['@value']}}"
      - name: "wthr today 01h description"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['symbol']['@desc']}}"
      - name: "wthr today 01h wind"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['wind']['@value']}}"
        device_class: "wind_speed"
        unit_of_measurement: "km/h"
      - name: "wthr today 01h wind-direction"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['wind']['@dir']}}"
      - name: "wthr today 01h wind-symbol"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['wind']['@symbol']}}"
      - name: "wthr today 01h wind-symbolB"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['wind']['@symbolB']}}"
      - name: "wthr today 01h wind-gust"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['wind-gust']['@value']}}"
        device_class: "wind_speed"
        unit_of_measurement: "km/h"
      - name: "wthr today 01h rain"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['rain']['@value']}}"
        device_class: "precipitation"
        unit_of_measurement: "mm"
      - name: "wthr today 01h humidity"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['humidity']['@value']}}"
        device_class: "humidity"
        unit_of_measurement: "%"
      - name: "wthr today 01h pressure"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['pressure']['@value']}}"
        device_class: "atmospheric_pressure"
        unit_of_measurement: "mbar"
      - name: "wthr today 01h clouds"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['clouds']['@value']}}"
      - name: "wthr today 01h snowline"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['snowline']['@value']}}"
        unit_of_measurement: "m"
      - name: "wthr today 01h windchill"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['windchill']['@value']}}"
        device_class: "temperature"
        unit_of_measurement: "ºC"
      - name: "wthr today 01h uv"
        value_template: "{{ value_json['report']['location']['day'][0]['hour'][0]['uv_index']['@value']}}"
...

and an extract of the xml file :

<report>
<location city="San Fabián de Alico [Ñuble;Chile]">
<interesting>
<url description="Predicción">https://www.meteored.cl/tiempo-en_San+Fabian+de+Alico-America+Sur-Chile-Biobio--1-18013.html</url>
</interesting>
<day value="20241025" name="Viernes">
<symbol value="5" desc="Intervalos nubosos con lluvias débiles" value2="12" desc2="Cielos nubosos con chubascos tormentosos"/>
<tempmin value="4" unit="°C"/>
<tempmax value="17" unit="°C"/>
<wind value="13" unit="km/h" symbol="15" symbolB="47"/>
<wind-gusts value="37" unit="km/h"/>
<rain value="0.1" unit="mm"/>
<humidity value="80"/>
<pressure value="1020" unit="mb"/>
<snowline value="1800" unit="m"/>
<uv_index_max value="8"/>
<sun in="06:49" mid="13:30" out="20:12"/>
<moon in="03:44" out="13:57" lumi="37.25%" desc="Menguante, 37.25% Iluminada" symbol="6"/>
<local_info local_time="07:40" offset="-3"/>
<hour value="01:00">
<temp value="9" unit="°C"/>
<symbol value="5" desc="Intervalos nubosos con lluvias débiles" value2="12" desc2="Cielos nubosos con chubascos tormentosos"/>
<wind value="8" unit="km/h" dir="SW" symbol="14" symbolB="38"/>
<wind-gusts value="28" unit="km/h"/>
<rain value="0.1" unit="mm"/>
<humidity value="91"/>
<pressure value="1020" unit="mb"/>
<clouds value="51%"/>
<snowline value="1900" unit="m"/>
<windchill value="8" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="02:00">
<temp value="9" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="6" unit="km/h" dir="S" symbol="13" symbolB="37"/>
<wind-gusts value="25" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="89"/>
<pressure value="1020" unit="mb"/>
<clouds value="12%"/>
<snowline value="1900" unit="m"/>
<windchill value="8" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="03:00">
<temp value="7" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="4" unit="km/h" dir="S" symbol="13" symbolB="37"/>
<wind-gusts value="28" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="95"/>
<pressure value="1020" unit="mb"/>
<clouds value="7%"/>
<snowline value="1900" unit="m"/>
<windchill value="7" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="04:00">
<temp value="5" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="3" unit="km/h" dir="SE" symbol="4" symbolB="28"/>
<wind-gusts value="16" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="100"/>
<pressure value="1020" unit="mb"/>
<clouds value="18%"/>
<snowline value="1900" unit="m"/>
<windchill value="6" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="05:00">
<temp value="5" unit="°C"/>
<symbol value="3" desc="Cielos nubosos" value2="4" desc2="Cielos cubiertos"/>
<wind value="2" unit="km/h" dir="SE" symbol="4" symbolB="28"/>
<wind-gusts value="12" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="100"/>
<pressure value="1020" unit="mb"/>
<clouds value="64%"/>
<snowline value="1900" unit="m"/>
<windchill value="5" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="06:00">
<temp value="5" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="4" unit="km/h" dir="E" symbol="3" symbolB="27"/>
<wind-gusts value="16" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="100"/>
<pressure value="1021" unit="mb"/>
<clouds value="23%"/>
<snowline value="1900" unit="m"/>
<windchill value="5" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="07:00">
<temp value="4" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="5" unit="km/h" dir="E" symbol="3" symbolB="27"/>
<wind-gusts value="15" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="100"/>
<pressure value="1022" unit="mb"/>
<clouds value="35%"/>
<snowline value="1900" unit="m"/>
<windchill value="4" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="08:00">
<temp value="7" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="7" unit="km/h" dir="E" symbol="3" symbolB="35"/>
<wind-gusts value="20" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="96"/>
<pressure value="1022" unit="mb"/>
<clouds value="37%"/>
<snowline value="2000" unit="m"/>
<windchill value="5" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="09:00">
<temp value="10" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="4" unit="km/h" dir="E" symbol="3" symbolB="35"/>
<wind-gusts value="20" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="82"/>
<pressure value="1023" unit="mb"/>
<clouds value="3%"/>
<snowline value="2100" unit="m"/>
<windchill value="10" unit="°C"/>
<uv_index value="1"/>
</hour>
<hour value="10:00">
<temp value="12" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="2" unit="km/h" dir="SW" symbol="6" symbolB="30"/>
<wind-gusts value="19" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="65"/>
<pressure value="1022" unit="mb"/>
<clouds value="0%"/>
<snowline value="2200" unit="m"/>
<windchill value="12" unit="°C"/>
<uv_index value="3"/>
</hour>
<hour value="11:00">
<temp value="13" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="8" unit="km/h" dir="SW" symbol="14" symbolB="38"/>
<wind-gusts value="23" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="63"/>
<pressure value="1022" unit="mb"/>
<clouds value="0%"/>
<snowline value="3200" unit="m"/>
<windchill value="13" unit="°C"/>
<uv_index value="5"/>
</hour>
<hour value="12:00">
<temp value="14" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="10" unit="km/h" dir="SW" symbol="14" symbolB="46"/>
<wind-gusts value="30" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="63"/>
<pressure value="1021" unit="mb"/>
<clouds value="17%"/>
<snowline value="3400" unit="m"/>
<windchill value="14" unit="°C"/>
<uv_index value="7"/>
</hour>
<hour value="13:00">
<temp value="15" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="11" unit="km/h" dir="W" symbol="15" symbolB="47"/>
<wind-gusts value="33" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="62"/>
<pressure value="1021" unit="mb"/>
<clouds value="20%"/>
<snowline value="3500" unit="m"/>
<windchill value="15" unit="°C"/>
<uv_index value="8"/>
</hour>
<hour value="14:00">
<temp value="16" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="13" unit="km/h" dir="W" symbol="15" symbolB="47"/>
<wind-gusts value="36" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="64"/>
<pressure value="1021" unit="mb"/>
<clouds value="23%"/>
<snowline value="3600" unit="m"/>
<windchill value="16" unit="°C"/>
<uv_index value="8"/>
</hour>
<hour value="15:00">
<temp value="16" unit="°C"/>
<symbol value="2" desc="Intervalos nubosos" value2="3" desc2="Cielos nubosos"/>
<wind value="12" unit="km/h" dir="SW" symbol="14" symbolB="46"/>
<wind-gusts value="37" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="65"/>
<pressure value="1021" unit="mb"/>
<clouds value="25%"/>
<snowline value="3600" unit="m"/>
<windchill value="16" unit="°C"/>
<uv_index value="7"/>
</hour>
<hour value="16:00">
<temp value="16" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="12" unit="km/h" dir="SW" symbol="14" symbolB="46"/>
<wind-gusts value="36" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="62"/>
<pressure value="1021" unit="mb"/>
<clouds value="10%"/>
<snowline value="3600" unit="m"/>
<windchill value="16" unit="°C"/>
<uv_index value="5"/>
</hour>
<hour value="17:00">
<temp value="16" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="11" unit="km/h" dir="SW" symbol="14" symbolB="46"/>
<wind-gusts value="33" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="62"/>
<pressure value="1020" unit="mb"/>
<clouds value="1%"/>
<snowline value="3600" unit="m"/>
<windchill value="16" unit="°C"/>
<uv_index value="3"/>
</hour>
<hour value="18:00">
<temp value="16" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="11" unit="km/h" dir="SW" symbol="14" symbolB="46"/>
<wind-gusts value="36" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="63"/>
<pressure value="1019" unit="mb"/>
<clouds value="0%"/>
<snowline value="3700" unit="m"/>
<windchill value="16" unit="°C"/>
<uv_index value="1"/>
</hour>
<hour value="19:00">
<temp value="16" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="9" unit="km/h" dir="SW" symbol="14" symbolB="38"/>
<wind-gusts value="27" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="67"/>
<pressure value="1019" unit="mb"/>
<clouds value="0%"/>
<snowline value="3800" unit="m"/>
<windchill value="16" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="20:00">
<temp value="13" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="6" unit="km/h" dir="S" symbol="13" symbolB="37"/>
<wind-gusts value="21" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="82"/>
<pressure value="1018" unit="mb"/>
<clouds value="0%"/>
<snowline value="3800" unit="m"/>
<windchill value="13" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="21:00">
<temp value="11" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="6" unit="km/h" dir="SE" symbol="12" symbolB="36"/>
<wind-gusts value="27" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="88"/>
<pressure value="1018" unit="mb"/>
<clouds value="0%"/>
<snowline value="3800" unit="m"/>
<windchill value="11" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="22:00">
<temp value="11" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="6" unit="km/h" dir="SE" symbol="4" symbolB="28"/>
<wind-gusts value="18" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="90"/>
<pressure value="1018" unit="mb"/>
<clouds value="0%"/>
<snowline value="3900" unit="m"/>
<windchill value="11" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="23:00">
<temp value="9" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="8" unit="km/h" dir="E" symbol="11" symbolB="35"/>
<wind-gusts value="22" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="96"/>
<pressure value="1018" unit="mb"/>
<clouds value="0%"/>
<snowline value="3900" unit="m"/>
<windchill value="9" unit="°C"/>
<uv_index value="0"/>
</hour>
<hour value="24:00">
<temp value="9" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="10" unit="km/h" dir="E" symbol="11" symbolB="35"/>
<wind-gusts value="26" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="94"/>
<pressure value="1017" unit="mb"/>
<clouds value="0%"/>
<snowline value="3900" unit="m"/>
<windchill value="7" unit="°C"/>
<uv_index value="0"/>
</hour>
</day>
<day value="20241026" name="Sábado">
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<tempmin value="7" unit="°C"/>
<tempmax value="27" unit="°C"/>
<wind value="18" unit="km/h" symbol="11" symbolB="51"/>
<wind-gusts value="46" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="72"/>
<pressure value="1013" unit="mb"/>
<snowline value="3900" unit="m"/>
<uv_index_max value="9"/>
<sun in="06:47" mid="13:30" out="20:13"/>
<moon in="04:12" out="14:58" lumi="28.15%" desc="Menguante, 28.15% Iluminada" symbol="5"/>
<local_info local_time="07:40" offset="-3"/>
<hour value="01:00">
<temp value="8" unit="°C"/>
<symbol value="1" desc="Cielos despejados" value2="1" desc2="Cielos despejados"/>
<wind value="10" unit="km/h" dir="E" symbol="11" symbolB="35"/>
<wind-gusts value="27" unit="km/h"/>
<rain value="0" unit="mm"/>
<humidity value="89"/>

auto-answer
i corrected the daytime detection which was unconsistent.
I corrected the condition template value “partly cloudy” to “partlycloudy” which in my opinion is inconsistent with other terms like clear-night and others 2words conditions values
i corrected temperature for current forcast by adding this :

    temperature_template: >
        {% set hour = as_timestamp(now()) | timestamp_custom('%H') %}
        {{ states('sensor.wthr_today_'+hour+'h_temp') | float }}

1 Like