String does not match the pattern of "LEGACY_SYNTAX"

Hello tout le monde,

Je suis en train de refaire ma carte météo grâce à MySmartHome, et voici mon code

#METEO
- trigger:
    - platform: time_pattern
      hours: "1"
    - platform: homeassistant
      event: start
  action:
    - action: weather.get_forecasts
      target:
        entity_id: weather.avignon
      data:
        type: hourly
      response_variable: hourly
    - action: weather.get_forecasts
      target:
        entity_id: weather.avignon
      data:
        type: daily
      response_variable: daily
  sensor:
    - name: Meteo - Avignon
      unique_id: meteo_avignon
      state: "{{ now().isoformat() }}"
      attributes:
        now_condition: "{{ hourly['weather.avignon'].forecast[0].condition }}"
        now_icon: >
          {% set weather = hourly['weather.avignon'].forecast[0].condition %}
          {% if is_state('sun.sun', 'above_horizon') %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
          {% else %}
          {{ '/local/weather_icons/' + weather + '_night.svg' }}
          {% endif %}
        now_temp: "{{ hourly['weather.avignon'].forecast[0].temperature }}"
        now_wind_speed: "{{ ((hourly['weather.avignon'].forecast[0].wind_speed | float) / 3.6) | round(1) }}"
        now_wind_bearing: "{{ hourly['weather.avignon'].forecast[0].wind_bearing }}"
        now_precipitation: "{{ hourly['weather.avignon'].forecast[0].precipitation }}"
        now_precipitation_probability: "{{ hourly['weather.avignon'].forecast[0].precipitation_probability }}"
        now_humidity: "{{ hourly['weather.avignon'].forecast[0].humidity }}"
        now_feels_like: >
          {% set T = (hourly['weather.avignon'].forecast[0].temperature | float) %}
          {% set K = (hourly['weather.avignon'].forecast[0].wind_speed | float)/3.6 %}
          {% set V = (K/1000*60*60) %}
          {% set A = 13.12 + 0.6215*T -11.37*(V**0.16) + 0.3965*T*(V**0.16) %}
          {{ (A) | round (1) }}
        now_wind_direction: >
          {% set direction = ['N','NNO','NO','ONO','O','OSO','SO','SS0','S','SSV','SV','VSV','V','VNV','NV','NNV','N'] %}
          {% set degree = hourly['weather.avignon'].forecast[0].wind_bearing | float) %}
          {{ direction[((degree+11.25)/22.5)|int] }}
        now_wind_desc: "{{ hourly['weather.avignon'].forecast[0].wind_speed | float) }}"
          
        today_condition: "{{ daily['weather.avignon'].forecast[0].condition }}"
        today_icon: >
          {% set weather = daily['weather.avignon'].forecast[0].condition %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
        today_temp: "{{ daily['weather.avignon'].forecast[0].temperature }}"
        today_wind_speed: "{{ ((daily['weather.avignon'].forecast[0].wind_speed | float) / 3.6) | round(1) }}"
        today_wind_bearing: "{{ daily['weather.avignon'].forecast[0].wind_bearing }}"
        today_precipitation: "{{ daily['weather.avignon'].forecast[0].precipitation }}"
        today_precipitation_probability: "{{ daily['weather.avignon'].forecast[0].precipitation_probability }}"
        today_humidity: "{{ daily['weather.avignon'].forecast[0].humidity }}"
        today_feels_like: >
          {% set T = (daily['weather.avignon'].forecast[0].temperature | float) %}
          {% set K = (daily['weather.avignon'].forecast[0].wind_speed | float)/3.6 %}
          {% set V = (K/1000*60*60) %}
          {% set A = 13.12 + 0.6215*T -11.37*(V**0.16) + 0.3965*T*(V**0.16) %}
          {{ (A) | round (1) }}
        today_wind_direction: >
          {% set direction = ['N','NNO','NO','ONO','O','OSO','SO','SS0','S','SSV','SV','VSV','V','VNV','NV','NNV','N'] %}
          {% set degree = daily['weather.avignon'].forecast[0].wind_bearing | float) %}
          {{ direction[((degree+11.25)/22.5)|int] }}
        today_wind_desc: "{{ daily['weather.avignon'].forecast[0].wind_speed | float) }}"

        forc1_datetime: "{{ daily['weather.avignon'].forecast[1].datetime }}"
        forc1_condition: "{{ daily['weather.avignon'].forecast[1].condition }}"
        forc1_icon: >
          {% set weather = daily['weather.avignon'].forecast[1].condition %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
        forc1_temp: "{{ daily['weather.avignon'].forecast[1].temperature }}"
        forc1_precipitation: "{{ daily['weather.avignon'].forecast[1].precipitation }}"
        forc2_datetime: "{{ daily['weather.avignon'].forecast[2].datetime }}"
        forc2_condition: "{{ daily['weather.avignon'].forecast[2].condition }}"
        forc2_icon: >
          {% set weather = daily['weather.avignon'].forecast[2].condition %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
        forc2_temp: "{{ daily['weather.avignon'].forecast[2].temperature }}"
        forc2_precipitation: "{{ daily['weather.avignon'].forecast[2].precipitation }}"
        forc3_datetime: "{{ daily['weather.avignon'].forecast[3].datetime }}"
        forc3_condition: "{{ daily['weather.avignon'].forecast[3].condition }}"
        forc3_icon: >
          {% set weather = daily['weather.avignon'].forecast[3].condition %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
        forc3_temp: "{{ daily['weather.avignon'].forecast[3].temperature }}"
        forc3_precipitation: "{{ daily['weather.avignon'].forecast[3].precipitation }}"
        forc4_datetime: "{{ daily['weather.avignon'].forecast[4].datetime }}"
        forc4_condition: "{{ daily['weather.avignon'].forecast[4].condition }}"
        forc4_icon: >
          {% set weather = daily['weather.avignon'].forecast[4].condition %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
        forc4_temp: "{{ daily['weather.avignon'].forecast[4].temperature }}"
        forc4_precipitation: "{{ daily['weather.avignon'].forecast[4].precipitation }}"
        forc5_datetime: "{{ daily['weather.avignon'].forecast[5].datetime }}"
        forc5_condition: "{{ daily['weather.avignon'].forecast[5].condition }}"
        forc5_icon: >
          {% set weather = daily['weather.avignon'].forecast[5].condition %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
        forc5_temp: "{{ daily['weather.avignon'].forecast[5].temperature }}"
        forc5_precipitation: "{{ daily['weather.avignon'].forecast[5].precipitation }}"
        forc6_datetime: "{{ daily['weather.avignon'].forecast[6].datetime }}"
        forc6_condition: "{{ daily['weather.avignon'].forecast[6].condition }}"
        forc6_icon: >
          {% set weather = daily['weather.avignon'].forecast[6].condition %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
        forc6_temp: "{{ daily['weather.avignon'].forecast[6].temperature }}"
        forc6_precipitation: "{{ daily['weather.avignon'].forecast[6].precipitation }}"
        forc7_datetime: "{{ daily['weather.avignon'].forecast[7].datetime }}"
        forc7_condition: "{{ daily['weather.avignon'].forecast[7].condition }}"
        forc7_icon: >
          {% set weather = daily['weather.avignon'].forecast[7].condition %}
          {{ '/local/weather_icons/' + weather + '.svg' }}
        forc7_temp: "{{ daily['weather.avignon'].forecast[7].temperature }}"
        forc7_precipitation: "{{ daily['weather.avignon'].forecast[7].precipitation }}"

Malheureusement, au début j’ai ces 2 messages d’erreur.

Capture d’écran du 2025-06-11 00-43-38

Savez-vous d’où ça peut venir ?

Merci beaucoup :slight_smile: