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

Sorry, I don’t know whether to open a new topic or whether I can write here: I would like to create my own Weather entity by taking data from a local bulletin updated daily. Do you have any idea how to do it?
Online I found these bulletins in xml:
https://meteo.arpa.veneto.it/meteo/bollettini/it/xml/bollettino_utenti.xml
https://wwwold.arpa.veneto.it/previsioni/it/xml/bollettino_widget.xml
the bulletin is different but talks about the same data.
Using a file found in a Facebook group, but dating back 3 years ago, I managed to compile a yaml file with which I obtain different entities, but I don’t know if it is the right way to create a Weather entity. This is my file that I made:

homeassistant:

##############################################################
#                                                            #
#                       BINARY_SENSOR                        #
#                                                            #
##############################################################

# diventa ON quanto c'è nuovo bollettino, serve per visualizzazione su scheda
binary_sensor:
  - platform: template
    sensors:
      arpav_nuovo_bollettino:
        entity_id: input_boolean.arpav_nuovo_bollettino
        device_class: power
        value_template: "{{ is_state('input_boolean.arpav_nuovo_bollettino', 'on') }}"
        icon_template: mdi:information-variant

##############################################################
#                                                            #
#                       SENSORI                              #
#                                                            #
##############################################################

sensor:
# seleziona l'ID dell zona per i sensor restful
  - platform: template
    sensors:
      arpav_zona_id:
        entity_id: input_select.arpav_zona
        icon_template: mdi:target
        value_template: >-
          {% set zona = states('input_select.arpav_zona') %}
          {% if zona == "Dolomiti Nord-Est" %} 0
          {% elif zona == "Dolomiti Sud-Ovest" %} 1
          {% elif zona == "Belluno e Prealpi orientali" %} 2
          {% elif zona == "Prealpi centrali" %} 3
          {% elif zona == "Pedemontana orientale" %} 4
          {% elif zona == "Treviso e pianura orientale" %} 5
          {% elif zona == "Veneziano orientale" %} 6
          {% elif zona == "Prealpi occidentali" %} 7
          {% elif zona == "Vicenza e pedemontana" %} 8
          {% elif zona == "Padova e pianura centrale" %} 9
          {% elif zona == "Venezia e laguna" %} 10
          {% elif zona == "Delta del Po" %} 11
          {% elif zona == "Rovigo e pianura meridionale" %} 12
          {% elif zona == "Verona e pedemontana" %} 13
          {% elif zona == "Area del Garda" %} 14
          {% elif zona == "Litorale nord" %} 15
          {% elif zona == "Litorale centrale" %} 16
          {% else%} 17
          {% endif %}
          
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: ARPAV Bollettino Aggiornamento
    value_template: "{{ value_json.previsioni.data_aggiornamento['@date']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: ARPAV Bollettino Emissione
    value_template: "{{ value_json.previsioni.data_emissione['@date']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_zona
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int]['@name']  }}"
    scan_interval: 600
    
# Test per file    https://wwwold.arpa.veneto.it/previsioni/it/xml/bollettino_widget.xml 
#  - platform: rest
#    resource: https://wwwold.arpa.veneto.it/previsioni/it/xml/bollettino_widget.xml
#    name: arpav_vidget
#    value_template: "{{ value_json.bulletin.meteograms.meteogram[states('sensor.arpav_zona_id')|int].days.day[0].sky['@img'] }}"
#    scan_interval: 600
    
# Prima Mezza Giornata
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_simbolo0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[0]['@value']  }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_data0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0]['@data'] | default('Valore non disponibile') }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_cielo0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[1]['@value'] | default('Valore non disponibile') }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_temperatura0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[2]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_precipitazioni0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[3]['@value']}}"
    scan_interval: 600
  - 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']}}"
    scan_interval: 600

# Seconda Mezza Giornata
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_simbolo1
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[1].previsione[0]['@value']  }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_data1
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[1]['@data'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_cielo1
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[1].previsione[1]['@value'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_temperatura1
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[1].previsione[2]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_precipitazioni1
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[1].previsione[3]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_probabilita1
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[1].previsione[4]['@value']}}"
    scan_interval: 600
    
# terza Mezza Giornata
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_simbolo2
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[2].previsione[0]['@value']  }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_data2
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[2]['@data'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_cielo2
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[2].previsione[1]['@value'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_temperatura2
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[2].previsione[2]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_precipitazioni2
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[2].previsione[3]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_probabilita2
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[2].previsione[4]['@value']}}"
    scan_interval: 600

# quarta Mezza Giornata
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_simbolo3
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[3].previsione[0]['@value']  }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_data3
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[3]['@data'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_cielo3
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[3].previsione[1]['@value'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_temperatura3
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[3].previsione[2]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_precipitazioni3
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[3].previsione[3]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_probabilita3
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[3].previsione[4]['@value']}}"
    scan_interval: 600

# quinta Mezza Giornata
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_simbolo4
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[4].previsione[0]['@value']  }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_data4
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[4]['@data'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_cielo4
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[4].previsione[1]['@value'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_temperatura4
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[4].previsione[2]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_precipitazioni4
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[4].previsione[3]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_probabilita4
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[4].previsione[4]['@value']}}"
    scan_interval: 600

# quarta  Giornata
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_simbolo5
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[5].previsione[0]['@value']  }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_data5
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[5]['@data'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_cielo5
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[5].previsione[1]['@value'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_temperatura5
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[5].previsione[2]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_precipitazioni5
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[5].previsione[3]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_probabilita5
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[5].previsione[2]['@value']}}"
    scan_interval: 600

# quinta Giornata
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_simbolo6
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[6].previsione[0]['@value']  }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_data6
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[6]['@data'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_cielo6
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[6].previsione[1]['@value'] }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_precipitazioni6
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[6].previsione[3]['@value']}}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_probabilita6
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[6].previsione[2]['@value']}}"
    scan_interval: 600
    
##############################################################
#                                                            #
#                       INPUT                                #
#                                                            #
##############################################################

# memorizza ultimo aggiornamento bollettino
input_text:
  arpav_data_ultimo_aggiornamento:
    name: ARPAV Data Ultimo Aggiornamento

# Diventa ON quando viene emesso un nuovo bollettino o un nuovo aggiornamento
input_boolean:
  arpav_nuovo_bollettino:
    name: ARPAV Nuovo Bollettino

# Selettore Zone presenti nel bollettino. Cambiare initial con la zona preferita
# altrimenti prende la prima della lista
input_select:
  arpav_zona:
    name: ARPAV Zona
    options:
      - "Dolomiti Nord-Est"
      - "Dolomiti Sud-Ovest"
      - "Belluno e Prealpi orientali"
      - "Prealpi centrali"
      - "Pedemontana orientale"
      - "Treviso e pianura orientale"
      - "Veneziano orientale"
      - "Prealpi occidentali"
      - "Vicenza e pedemontana"
      - "Padova e pianura centrale"
      - "Venezia e laguna"
      - "Delta del Po"
      - "Rovigo e pianura meridionale"
      - "Verona e pedemontana"
      - "Area del Garda"
      - "Litorale nord"
      - "Litorale centrale"
      - "Litorale sud"
    icon: mdi:target
    initial: "Padova e pianura centrale"
##############################################################
#                                                            #
#                       SCRIPT                               #
#                                                            #
##############################################################

script:
  bollettino_popup:
    sequence:
      - service: input_boolean.turn_off
        data: 
          entity_id: input_boolean.arpav_nuovo_bollettino
      - service: browser_mod.popup
        data:
#          deviceID: this
          deviceID:
            - 287fb5ea-a9efbc29
            - 10a2bdb2-a819d0cf
            - beca2af9_00864dab
          title: Bollettino Meteo ARPAV
          large: true
          card:
            type: markdown
            style: |
              table, th, td {
                border: 1px solid black;
              }
            content: >-
              **Bollettino {{ states('sensor.arpav_zona') }}**
              
              **Emesso il {{ states('sensor.arpav_bollettino_emissione') }}{% if states('sensor.arpav_bollettino_aggiornamento') != 'unknown' %} e aggiornato il {{ states('sensor.arpav_bollettino_aggiornamento') }}**{%else%}**{%endif%}

               <table style="width: 1000px" class="center" align="center" border="1" cellspacing="0" cellpadding="0>
               <colgroup>
               <col span="1" style="width: 150px">
               <col span="1" style="width: 200px">
               <col span="1" style="width: 150px"> 
               <col span="1" style="width: 300px">
               <col span="1" style="width: 100px">
               <col span="1" style="width: 100px">
               </colgroup>
                      
               <thead> 
               <tr style="height:300px">
               <th>Data</th>
               <th>Prev.</th>
               <th>Temp.</th>
               <th>Precip.</th>
               <th>%</th>
               <th></th>
               </tr>
               </thead> 
               <tbody> 
               <tr style="height:300px">
               <td align="left">{{states('sensor.arpav_data0')[0:6]}}</td>
               <td align="center">{{states('sensor.arpav_cielo0')}}</td>
               <td align="center">{{states('sensor.arpav_temperatura0')}}</td>
               <td align="center">{{states('sensor.arpav_precipitazioni0')}}</td>
               <td align="center">{{states('sensor.arpav_probabilita0')}}</td>
               <td align="center"><img src="{{states('sensor.arpav_simbolo0')}}" height="40" ></td>
               </tr>
               <tr style="height:300px">
               <td align="left">{{states('sensor.arpav_data1')[0:6]}}</td>
               <td align="center">{{states('sensor.arpav_cielo1')}}</td>
               <td align="center">{{states('sensor.arpav_temperatura1')}}</td>
               <td align="center">{{states('sensor.arpav_precipitazioni1')}}</td>
               <td align="center">{{states('sensor.arpav_probabilita1')}}</td>
               <td align="center"><img src="{{states('sensor.arpav_simbolo1')}}" height="40" ></td>
               </tr>
               <tr style="height:300px">
               <td align="left">{{states('sensor.arpav_data2')[0:6]}}</td>
               <td align="center">{{states('sensor.arpav_cielo2')}}</td>
               <td align="center">{{states('sensor.arpav_temperatura2')}}</td>
               <td align="center">{{states('sensor.arpav_precipitazioni2')}}</td>
               <td align="center">{{states('sensor.arpav_probabilita2')}}</td>
               <td align="center"><img src="{{states('sensor.arpav_simbolo2')}}" height="40" ></td>
               </tr> 
               </table>

##############################################################
#                                                            #
#                  AUTOMAZIONI                               #
#                                                            #
##############################################################

automation:
# Mette ON input_boolean.arpav_nuovo_bollettino quando cambia la data rispetto 
# all'ultimo aggiornamento contenuta in input_text.arpav_data_ultimo_aggiornamento
  - id: '1575837712577'
    mode: single
    alias: Aggiornamento bollettino ARPAV
    trigger:
    - platform: template
      value_template: "{{ states('sensor.arpav_bollettino_aggiornamento') != states('input_text.arpav_data_ultimo_aggiornamento') }}" 
    condition: []
    action:
    - data: {}
      entity_id: input_boolean.arpav_nuovo_bollettino
      service: input_boolean.turn_on
    - data_template:
        value: "{{states('sensor.arpav_bollettino_aggiornamento')}}"
      entity_id: input_text.arpav_data_ultimo_aggiornamento
      service: input_text.set_value

# Aggiorna i sensori sensor.arpav_xxxx dopo ogni cambio di stato del selettore input_select.arpav_zona
# e mette ON input_boolean.arpav_nuovo_bollettino
  - id: '1575837712578'
    mode: single 
    alias: aggiorna sensori ARPAV
    trigger:
      platform: state
      entity_id: input_select.arpav_zona
    action:
    -  service: homeassistant.update_entity
       entity_id:
         - sensor.arpav_zona
         - sensor.arpav_data0
         - sensor.arpav_simbolo0
         - sensor.arpav_cielo0
         - sensor.arpav_temperatura0
         - sensor.arpav_precipitazioni0
         - sensor.arpav_probabilita0
         - sensor.arpav_data1
         - sensor.arpav_simbolo1
         - sensor.arpav_cielo1
         - sensor.arpav_temperatura1
         - sensor.arpav_precipitazioni1
         - sensor.arpav_probabilita1
         - sensor.arpav_data2
         - sensor.arpav_simbolo2
         - sensor.arpav_cielo2
         - sensor.arpav_temperatura2
         - sensor.arpav_precipitazioni2
         - sensor.arpav_probabilita2
    - data: {}
      entity_id: input_boolean.arpav_nuovo_bollettino
      service: input_boolean.turn_on


I bring the image to confirm that the file works, it creates all the entities of the bulletin, but how could I create a single forecast entity.
If anyone would like to help me I would be grateful.

The weather integration cannot be directly used. You cannot create your own weather entities using this integration. This integration is a building block for other integrations to use, enabling them to create weather entities for you.

In short, you cant: you’d have to write your own integration if one does not already exist. see below

If you are still planning to use that XML, consider the RESTful integration, which allows you to create all those sensors with a single API call:

I’m definitely not a programmer, nor a home assistant expert. I was thinking of this way because by doing so I hoped to be able to use that new entity as a basis for all the beautiful card forecasts that I see online, without having to create one and modify it every time I no longer like it :slight_smile:
If this is not possible, what should I do? Create my own card using the data I have already extracted?
It’s not very clear to me what you wrote about the single API call, I have already extracted all the sensors and I see them all among my entities, but I wouldn’t know how to use them in an orderly manner, so they are useless

I know: it would be great to be able to construct our own weather entities, but you can’t within HA. see below

Every time HA tries to update these, it has to fetch the XML once for each of the sensors. If you do it as documented in the link, you make one call to the XML and pull all of the sensors from it.

1 Like

Uhhh, yes you can. There’s a template weather integration, it’s even built in.

Rest sensor to get the xml put into a template weather.

2 Likes

Really? Could you tell me where? I don’t find anything about it🥴

3 Likes

Thanks, I’ll try to use it. I’m not really good, and I don’t understand if it’s really what I want. I try to read the documentation well and understand, I would not want to use my location.I just want to use xml data, I hope it’s possible. Thanks

Yes, you have to create a rest sensor that reads the xml into a sensor’s attributes. Then use that entity and it’s attributes to create your weather entity.

This will not be easy, and you’ll need to learn a lot of advanced functionality in HA to make it happen.

Every day is a school day. Thanks — have built mine already.

@Diegocampy — have a go with this and see how you get on. The forecast_template expects a list of dictionaries with the key:value pairs as shown towards the end of this page:

1 Like

I don’t know where to start, I tried, but I didn’t succeed.

I suggest you start posting what you’ve tried. No one is going to write this for you but we will be glad to help you along the way.

1 Like

What I did is in the first post. Now in the Home Assistant I see a lot of sensors. I all mapped them, but I don’t understand how to use them in Weather.
I have write a file yaml with this code:

    
# Prima Mezza Giornata
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_simbolo0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[0]['@value'] | default('Valore non disponibile') }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_data0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0]['@data'] | default('Valore non disponibile') }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_cielo0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[1]['@value'] | default('Valore non disponibile') }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_temperatura0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[2]['@value'] | default('Valore non disponibile') }}"
    scan_interval: 600
  - platform: rest
    resource: https://www.arpa.veneto.it/previsioni/it/xml/bollettino_utenti.xml
    name: arpav_precipitazioni0
    value_template: "{{ value_json.previsioni.meteogrammi.meteogramma[states('sensor.arpav_zona_id')|int].scadenza[0].previsione[3]['@value'] | default('Valore non disponibile') }}"
    scan_interval: 600
  - 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

And Now I have this element for all days:


Recover from this part of the XML file:

Ok, I can see the text, but I don’t understand if is the right rue to do te weather :roll_eyes:.
Now? I see Weather page and Template Weather Provider

But I don’t understand where is the right rue for me :woozy_face:. I am really mortified, until a few months ago I didn’t even know what a yaml file was, I try to learn, but often I copy from examples, both of these procedures I don’t understand them. Or rather, I didn’t understand what I should write in which other files .

I’ve documented mine here, which might help you:

The difficult bit will be converting your XML sources into the forecast structure that the entity requires, which isn’t helped by your sources formatting data like this:

<scadenza data="dom 25 febbraio pomeriggio">
  <previsione title="Simbolo" type="image" value="https://www.arpa.veneto.it/previsioni/images/meteosymbols/a4.png"/>
  <previsione title="Cielo" type="text" value="Irregolarmente nuvoloso con schiarite"/>
  <previsione title="Temperatura 2000m" type="text" value="max -3 C"/>
  <previsione title="Temperatura 3000m" type="text" value="max -10 C"/>

My advice would be to find a different weather data provider.

1 Like

I’ve been trying since last night, I managed to get something, look here:
image

I used this code for the Weather which draws data from the other sensors I had created (it translates the written weather from the local weather service, the other data such as temperature, humidity, pressure and wind are from my weather station). I don’t know if it’s the most correct solution, but for now it works. I was unable to do the same for the forecasts for the following days, I will continue to search and will also read your documentation hoping it can help me with the codes. Thank you

weather:
  - platform: template
    name: ARPAV Weather
    condition_template: >
      {% set condition_text = states('sensor.arpav_cielo0') %}
      {% if 'Nuvoloso' in condition_text %}
        cloudy
      {% elif 'Coperto' in condition_text %}
        cloudy
      {% elif 'Grandine' in condition_text %}
        hail
      {% elif 'Soleggiato' in condition_text %}
        sunny
      {% elif 'Sereno o poco nuvoloso' in condition_text %}
        partlycloudy
      {% elif 'Pioggia' in condition_text %}
        rainy
      {% elif 'Nebbia' in condition_text %}
        fog
      {% else %}
        unknown
      {% endif %}
    temperature_template: "{{ states('sensor.giardino_temperature') }}"
    humidity_template: "{{ states('sensor.giardino_humidity') }}"
    pressure_template: "{{ states('sensor.cucina_pressure') }}"
    wind_speed_template: "{{ states('sensor.anemometro_wind_strength') }}"
    wind_bearing_template: "{{ states('sensor.anemometro_direction') }}"
1 Like

This will pull out the second number from "max 10/12 C" so you can use it as an actual number:

    temperature_template: "{{ (states('sensor.arpav_temperatura0').split('/')[1])|select('in','-0123456789.,')|join|replace(',','.') }}"
    temperature_unit: "°C"

Change the [1] for [0] if you want to use the first number instead. It should work even if the XML source includes decimal points or commas.

1 Like

I had posted a wrong code, now corrected, I actually use the data from my weather station for the current temperature, and not “max 10/12 C”, but your code will certainly help me for the forecast data. Which I haven’t yet managed to integrate into the weather entity

I would like to try to do everything well as you did, starting from the recovery of the data with REST. Would you like to help me? I don’t have an API key as you wrote in your code.Is the same possible?

I calmly managed to configure the current weather situation,
I found all the symbols and created a code that converts the text of the symbol with the weather forecast

but I didn’t understand how to insert the following days
image
this is my code:

weather:
  - platform: template
    name: ARPAV Weather
    condition_template: >
      {% set condition_text = states('sensor.arpav_simbolo0') %}
      {% if 'b6.png' in condition_text or
            'b7.png' in condition_text or
            'b8.png' in condition_text or
            'b9.png' in condition_text or
            'b10.png' in condition_text %}
        pouring
      {% elif 'a1N' in condition_text %}
        clear-night
      {% elif 'a4' in condition_text or
              'a5' in condition_text or
              'a6' in condition_text %}
        cloudy
      {% elif 'a3' in condition_text %}
        partlycloudy
      {% elif 'f1.png' in condition_text or
              'f2.png' in condition_text or
              'f3.png' in condition_text or
              'f4.png' in condition_text %}
        fog
      {% elif 'c1.png' in condition_text or
              'c2.png' in condition_text or
              'c3.png' in condition_text or
              'c5.png' in condition_text or
              'c6.png' in condition_text or
              'c7.png' in condition_text or
              'c8.png' in condition_text or
              'c9.png' in condition_text or
              'c10.png' in condition_text %}
        lightning-rainy
      {% elif 'b1.png' in condition_text or
              'b2.png' in condition_text or
              'b3.png' in condition_text or
              'b4.png' in condition_text or
              'b5.png' in condition_text %}
        rainy
      {% elif 'd1.png' in condition_text or
              'd2.png' in condition_text or
              'd3.png' in condition_text or
              'd4.png' in condition_text or
              'd5.png' in condition_text or
              'd6.png' in condition_text or
              'd7.png' in condition_text or
              'd8.png' in condition_text or
              'd9.png' in condition_text or
              'd10.png' in condition_text %}
        snowy
      {% elif 'e1.png' in condition_text or
              'e2.png' in condition_text or
              'e3.png' in condition_text or
              'e4.png' in condition_text or
              'e5.png' in condition_text or
              'e6.png' in condition_text or
              'e7.png' in condition_text or
              'e8.png' in condition_text or
              'e9.png' in condition_text or
              'e10.png' in condition_text %}
        snowy-rainy
      {% elif 'a1' in condition_text or
              'a2' in condition_text %}
        sunny
      {% else %}
        unknown
      {% endif %}
    temperature_template: "{{ states('sensor.giardino_temperature') }}"
    humidity_template: "{{ states('sensor.giardino_humidity') }}"
    pressure_template: "{{ states('sensor.cucina_pressure') }}"
    wind_speed_template: "{{ states('sensor.anemometro_wind_strength') }}"
    wind_bearing_template: "{{ states('sensor.anemometro_direction') }}"


I have already created all the sensors with the forecasts for the next few days, but I don’t understand how to insert them into weather. Can you help me? Thanks, and I apologize again if I’m not able

You need to build a forecast list object that matches the format shown here:

Mine looks like this (truncated to two items, not all data entries are needed):

[
  {
    "datetime": "2024-03-01T12:00:00+00:00",
    "is_daytime": true,
    "condition": "pouring",
    "humidity": 86,
    "pressure": 98675,
    "temperature": 6,
    "templow": 3,
    "precipitation_probability": 59,
    "wind_speed": 6
  },
  {
    "datetime": "2024-03-02T00:00:00+00:00",
    "is_daytime": false,
    "condition": "cloudy",
    "humidity": 92,
    "pressure": 98996,
    "temperature": 4,
    "templow": 3,
    "precipitation_probability": 28,
    "wind_speed": 3
  }
]

You need to build a forecast_twice_daily_template that creates that structure from your sensors in the same sort of way I did in mine.

You’ll need to work out how to get a nice ISO-formatted timestamp and is_daytime boolean from your date field. Here’s an attempt, mapping is_daytime to the afternoon:

{% set input = "sab 2 marzo pomeriggio" %}
{% set w, d, m, t = input.split() %}
{% set mn = ['gennaio','febbraio','marzo','aprile','maggio','giugno','luglio',
             'agosto','settembre','ottobre','novembre','dicembre'].index(m)+1 %}
{% set ts = "%d-%02d-%02dT%02d" % (now().year + (1 if mn < now().month else 0), mn, d|int, 12 if t == "pomeriggio" else 0) %}
{{ { "time": (ts|as_datetime).isoformat(),
     "is_daytime": t == "pomeriggio" } }}

but the later forecasts in that XML are full-day only so you’ll need to treat those separately.

For each of the data items, you’ll need to transform the XML output into the correct format, so dropping units to leave just a number etc.

Lots of work, I’m afraid.