Carte mushroom update V5.0.5

Bonjour,

Une mise à jour majeure de la populaire carte mushroom template de Piitaya m’est proposée. V5.0.5.

https://github.com/piitaya/lovelace-mushroom/releases/v5.0.5

Cela semble est une grosse refonte de la carte template mushroom pour s’approcher des standards de la carte tuile.

Je n’ai pas oser franchir le pas, déjà car si j’ai bien compris les couleurs sont harmonisées avec celle de HA et plus celle de mushroom. Sur ce point j’ai déjà pas mal de reprise sur les “deep orange” et autre couleur que j’utilise.

Tout ceci est dans une bonne optique d’harmonisation et facilité d’utilisation mais va demander un contrôle et reprise de pas mal de carte.

Qui a franchit le pas et ça donne quoi :sweat_smile: .

1 « J'aime »

Hormis les templates qui sont modifiés pour la personnalisation (j’en ai pas mal a revoir…), le reste c’est ok.
Il est possible pour la transition de garder sa configuration actuelle avec la carte template legacy.

2 « J'aime »

Je viens de faire le test sur mon ancienne machine fraîchement arrêtée, je ne vois pas de grosse casse pour le moment. Je viens de voir que les fonds d’icônes avaient disparus si il n’y avait pas d’actions d’affectées comme sur la carte tuile. Je me lance :grinning_face_with_smiling_eyes:

Edit: c’est bien fait, beau boulot des devs, tout devient paramétrable via UI

Maintenant il est clair de voir la différence entre les actions sur les icônes ou la barre. Si pas d’actions sur icône, plus de fond icône

1 « J'aime »

Salut,
maj faite et j’ai remplacer mes cartes en custom:mushroom-template-card parcustom:mushroom-legacy-template-card. je verrais plus tard pour passer sur la nouvelle template carte, comme tout le côté CSS a changer.

2 « J'aime »

Je vais faire de même dans un premier temps.

1 « J'aime »

J’ai vu la mise à jour, en V5.0… je ne me suis pas encore lancé, et on est déjà à la V5.0.5 !

Je n’ai pas d’instance de test donc j’ai eu la flemme de tout casser, mais c’est dans ma shopping list.

J’attend surtout de voir ce qui a été fait sur les features et si Piitaya nous prépare une surprise sur des feature customisables comme il l’avait laissé entendre là: Features in mushroom ? or Mushroom-features ? · piitaya/lovelace-mushroom · Discussion #1741 · GitHub

[Edit] Réponse d’aujourd’hui… c’est dans les plans… j’ai hate de voir la suite !

1 « J'aime »

Bon j’ai craqué… Je voulais regarder cette histoire de feature…


Alors bravo à @piitaya pour cet update !

La migration avec le petit pop up pour convertir en cartes legacy en un clic m’a permis de remettre mon dashboard dans le même état qu’avant en moins de 5 min…

Donc aucune régression observée.

Bravo aux dev pour cette délicate attention de prévoir une carte legacy et une façon simple de convertir !


Les nouvelles fonctionnalités semblent très intéressantes:

Pouvoir lier la zone pour en extraire quelques contrôles (la feature de la area card) est un premier pas intéressant !

Ci dessous un example avec une room card au dessus (stack-in card d’une mushroom template legacy et de chips avec du card mod), en dessous une carte mushroom template “V5” et les features de la pièce associé:

Ce n’est pas encore parfait, car il manque un peu de personnalisation de la feature (disponible avec custom card features si besoin…), la feature de la carte area toggle toutes les lumières, dans les cas de plusieurs lumières, je préfère un pop up (ou le more info d’un group de light) afin de pouvoir choisir quelle lumière allumer… Mais c’est un premier pas !

Je suis confiant qu’on va finir par avoir une personnalisation simple de boutons… J’espère que c’est pour la V5.0.6 ou la V5.1…

C’est probablement la future carte de base de mon dashboard dès qu’il y a un moyen simple d’ajouter quelques boutons personnalisables!

Ca sent la fin de stack-in-card et de card-mod chez moi…

1 « J'aime »

Bonjour à tous,

Je suis passé directement à la version v5.0.5. Bon, il y a un peu de casse côté personnalisation :slightly_smiling_face:. J’ai réussi à remplacer dans card_mod, “mushroom-state-info$:” par “ha-tile-info$:”. En revanche, dans une carte, j’ai une animation d’icône avec “ha-state-icon” et “@keyframes rotation”, et je n’arrive pas à mettre en même temps la personnalisation de la primary info avec “ha-tile-info$:”. Seule l’animation fonctionne, ou alors il faut supprimer l’animation et conserver la personnalisation de la primary info et c’est elle qui fonctionne. C’est fromage ou dessert :slightly_smiling_face:. Bon, je pense que les prochaines versions règleront le problème :wink:.

    card_mod:
      style: |
        ha-state-icon {
          {% if is_state('switch.module_vmc','off') %}
            animation: rotation 2s linear infinite;
            color: red;
          {% elif is_state('switch.module_vmc','on') %}
            animation: rotation 0.9s linear infinite;
            color: green;
          {% endif %}
        }       
        @keyframes rotation {
          100% {transform: rotate(360deg);
        }
        ha-tile-info$: {
          :host {
            width: 100%;
            text-align: center !important;
          }
          .primary {
            color: white !important;
            font-size: 10px !important;
            font-family: Arial;
          }
        }

Bonjour,
fais comme telle :

    card_mod:
      style:
        ha-tile-info$: |
          :host {
            width: 100%;
            text-align: center !important;
          }
          .primary {
            color: white !important;
            font-size: 10px !important;
            font-family: Arial;
          }
        .: |
          ha-state-icon {
            {% if is_state('switch.module_vmc','off') %}
              animation: rotation 2s linear infinite;
              color: red;
            {% elif is_state('switch.module_vmc','on') %}
              animation: rotation 0.9s linear infinite;
              color: green;
            {% endif %}
          }       
          @keyframes rotation {
            100% {transform: rotate(360deg);
          }

Bonjour @WarC0zes,

Merci pour ton aide. J’ai fait un copier/coller du code modifié, mais l’éditeur “mouline” comme s’il trouvait un problème d’indentation ou d’accolades mal placées. Je ne vois pas où ça coince :confused:

C’est bon, j’ai trouvé. Il y avait une accolade en trop :

    card_mod:
      style:
        ha-tile-info$: |
          :host {
            width: 100%;
            text-align: center !important;
          }
          .primary {
            color: white !important;
            font-size: 10px !important;
            font-family: Arial;
          }
        .: |
          ha-state-icon {
            {% if is_state('switch.module_vmc','off') %}
              animation: rotation 2s linear infinite;
              color: red;
            {% elif is_state('switch.module_vmc','on') %}
              animation: rotation 0.9s linear infinite;
              color: green;
            {% endif %}
          }       
          @keyframes rotation {
            100% {transform: rotate(360deg);
          }

Merci beaucoup ! Bonne journée :waving_hand:.

Oups, j’ai modifié le code trop vite :wink:

Bonjour.

Je profite de ce sujet pour une requête. Séduit par les animations de cette carte, je lai reprise en adaptant les infos principales et secondaires à mon besoin. J’aimerai savoir si c’est jouable de la convertir à la nouvelle version. J’ai fait quelques tentatives mais sans résultat .

type: custom:mushroom-legacy-template-card
primary: "{% set temps = {\n\t'clear-night': 'Nuit dégagée',\n\t'cloudy': 'Nuageux',\n\t'exceptional': 'Exceptionnel',\n\t'fog': 'Brouillard',\n\t'hail': 'Grêle',\n\t'lightning': 'rages',\n\t'lightning-rainy': 'Pluies orageuses',\n\t'partlycloudy': 'Eclaircies',\n\t'pouring': 'Averses',\n\t'rainy': 'Pluvieux',\n\t'snowy': 'Neige',\n\t'snowy-rainy': 'Pluie verglaçante',\n\t'sunny': 'Ensoleillé',\n\t'windy': 'Venteux',\n\t'windy-variant': 'Venteux variable'\n  } %}\n  {{ temps.get(states('sensor.openweathermap_condition'), 'white')\n  }} -\n  {{ (states('sensor.openweathermap_temperature') | float) |\n  round(1, default=0) | string | replace('.', ',') }} °C, ressenti\n  {{ (states('sensor.openweathermap_feels_like_temperature') |\n  float) | round(1, default=0) | string | replace('.', ',') }} °C"
secondary: >-
  {% set rain = states('sensor.rain_today') | float %}

  {% set rain_hour =
  states('sensor.openweathermap_forecast_precipitation_next_hour_probability') |
  float %}
    Min: {{ states('sensor.openweathermap_forecast_temperature_low') | float | round(0, default=0) | string | replace('.', ',') }}°C - Max: {{ states('sensor.openweathermap_forecast_temperature') | float | round(0, default=0) | string | replace('.', ',') }}°C - 💨 {{ states('sensor.openweathermap_wind_speed') | float | round(0, default=0) | string | replace('.', ',') }} km/h / {{ ['N','N-NE','NE','E-NE','E','E-SE','SE','S-SE','S','S-SO','SO','O-SO','O','O-NO','NO','N-NO','N'][((states('sensor.openweathermap_wind_bearing') | float + 11.25) / 22.5) | int % 16] }}
  {% if rain > 0 or rain_hour > 10 %}{% if rain > 0 %}🌧️ {{ rain | round(0) }}
  mm{% endif %}{% if rain > 0 and rain_hour > 10 %} - {% endif %}{% if rain_hour
  > 10 %}☔️🕐 {{ rain_hour | round(0) }}%{% endif %}
    {% endif %}
icon: "{% set icons = {\n\t'clear-night': 'mdi:weather-night',\n\t'cloudy': 'mdi:weather-cloudy',\n\t'exceptional': 'mdi:weather-cloudy-alert',\n\t'fog': 'mdi:weather-fog',\n\t'hail': 'mdi:weather-hail',\n\t'lightning': 'mdi:weather-lightning',\n\t'lightning-rainy': 'mdi:weather-lightning-rainy',\n\t'partlycloudy': 'mdi:weather-partly-cloudy' if is_state('sun.sun', 'above_horizon') else 'mdi:weather-night-partly-cloudy',\n\t'pouring': 'mdi:weather-pouring',\n\t'rainy': 'mdi:weather-rainy',\n\t'snowy': 'mdi:weather-snowy',\n\t'snowy-rainy': 'mdi:weather-snowy-rainy',\n\t'sunny': 'mdi:weather-sunny',\n\t'windy': 'mdi:weather-windy',\n\t'windy-variant': 'mdi:weather-windy-variant'\n  } %}\n\n  {{ icons.get(states('sensor.openweathermap_condition'),\n  'mdi:help-circle') }}"
entity: weather.openweathermap
icon_color: "{% set colors = {\n\t'clear-night': 'amber',\n\t'cloudy': 'grey',\n\t'exceptional': 'red',\n\t'fog': 'grey',\n\t'hail': 'grey',\n\t'lightning': 'dark-grey',\n\t'lightning-rainy': 'dark-grey',\n\t'partlycloudy': 'orange',\n\t'pouring': 'blue',\n\t'rainy': 'light-blue',\n\t'snowy': 'grey',\n\t'snowy-rainy': 'grey',\n\t'sunny': 'amber',\n\t'windy': 'light-blue',\n\t'windy-variant': 'cyan'\n  } %}\n\n  {{ colors.get(states('sensor.openweathermap_condition'), 'white')\n  }}"
grid_options:
  columns: 12
  rows: 1
tap_action:
  action: navigate
  navigation_path: /dashboard-mushroom/ephemerides
multiline_secondary: true
hold_action:
  action: none
double_tap_action:
  action: none
card_mod:
  style: |
    ha-card {
      height: 54px !important;
    }
    ha-state-icon {
      {% set condition = states('sensor.openweathermap_condition') %}
        {% if condition == 'clear-night' %} 
          animation: moon 10s linear infinite, stars 5s linear infinite;
        {% elif condition == 'cloudy' %} 
          animation: cloudy 10s ease-in-out infinite;
        {% elif condition == 'exceptional' %} 
          animation: exceptional 400ms ease-in-out infinite;
        {% elif condition == 'fog' %} 
          animation: cloudy 10s ease-in-out infinite, fog 4s infinite;
        {% elif condition == 'hail' %} 
          animation: cloudy 10s ease-in-out infinite, hail 2s infinite; 
        {% elif condition == 'lightning' %}
          animation: cloudy 10s ease-in-out infinite, lightning 4s infinite;
        {% elif condition == 'lightning-rainy' %}
          animation: cloudy 10s ease-in-out infinite, lightning-rainy 4s infinite; 
        {% elif condition == 'partlycloudy' %}
          {% if is_state('sun.sun', 'above_horizon') %}
            animation: cloudy 10s ease-in-out infinite, sun-partly 2s infinite;
          {% else %}
            position: relative;
            z-index: 1;
            animation: cloudy 10s ease-in-out infinite;
            /* animation: cloudy 10s ease-in-out infinite, moon-partly 10s linear infinite; */
          {% endif %}
        {% elif condition == 'pouring' %}
          animation: cloudy 10s ease-in-out infinite, pouring 1s infinite;
        {% elif condition == 'rainy' %}
          animation: cloudy 10s ease-in-out infinite, rainy 1.5s infinite; 
        {% elif condition == 'snowy' %}
          animation: cloudy 10s ease-in-out infinite, snowy 4s infinite;
        {% elif condition == 'snowy-rainy' %}
          animation: cloudy 10s ease-in-out infinite, snowy-rainy 4s infinite;
        {% elif condition == 'sunny' %}
          animation: sunny 8s ease-in-out infinite alternate;
        {% elif condition == 'windy' %}
          animation: windy 10s ease-in-out infinite; 
          transform-origin: 15% 50%
        {% elif condition == 'windy-variant' %}
          animation: cloudy 10s ease-in-out infinite, windy-variant 5s infinite;
        {% endif %}
    }
    ha-state-icon::after {
      content: "";
      position: absolute;
      inset: 0;
      background-color: rgba(73,52,22,1);
      clip-path: polygon(0 58%, 27% 58%, 34% 47%, 44% 42%, 55% 42%, 69% 47%, 74% 64%, 100% 67%, 100% 0, 0 0);
      opacity: 0;
      {% set condition = states('sensor.openweathermap_condition') %}
        {% if condition == 'partlycloudy' %}
          {% if is_state('sun.sun', 'below_horizon') %}
            animation: moon-partly 5s ease-in-out infinite alternate 1s; /* vertraagde fade-in */
          {% endif %}
        {% endif %}
      z-index: 2;
      pointer-events: none;
    }
    @keyframes moon {
      0%, 100% { transform: rotate(12deg); }
      30% { transform: rotate(-6deg); }
      45% { transform: rotate(8deg); }
      75% { transform: rotate(-10deg); }
    }
    @keyframes moon-partly {
      to {
        opacity: 1;
      }
    }
    @keyframes stars {
      0%, 3.1%, 14.1% { clip-path: inset(0 0 0 0); }
      3% { clip-path: polygon(1% 1%, 0% 99%, 99% 100%, 99% 62%, 68% 62%, 62% 44%, 76% 34%, 100% 34%, 99% 0%); }
      14% { clip-path: polygon(1% 1%, 0% 99%, 99% 100%, 100% 25%, 51% 45%, 38%, 34%, 36% 0); }
    }
    @keyframes cloudy {
      0%, 100% { transform: translateX(3px); }
      30% { transform: translateX(-1px); }
      45% { transform: translateX(1.5px); }
      75% { transform: translateX(-3.2px); }
    }
    @keyframes exceptional {
      0%, 100% { transform: translate(0, 0)}
      20%  { transform: translate(0px, -0.3px)}
      40%  { transform: translate(0px, 0.3px)}
      60%  { transform: translate(0px, 0.3px)}
      80%  { transform: translate(0px, -0.3px)}
    }
    @keyframes fog {
      0%, 26%, 76%, 100% { clip-path: inset(0 0 0 0); }
      25% { clip-path: polygon(0 0, 100% 0, 100% 59%, 60% 59%, 60% 74%, 100% 74%,100% 100%, 0 100%); }
      75%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 26% 100%, 26% 76%, 0 76%);}
    }
    @keyframes hail {
      0%, 26%, 51%, 76%, 100% { clip-path: inset(0 0 0 0); }
      25% { clip-path: polygon(0 0, 100% 0, 100% 100%, 62% 100%, 47% 69%, 56% 55%, 43% 43%, 31% 58%, 48% 68%, 63% 100%, 0 100%); }
      50%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 62% 100%, 61% 86%, 74% 74%, 61% 60%, 46% 69%, 60% 87%, 63% 100%, 0 100%); }
      75%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 47% 100%, 56% 83%, 42% 68%, 27% 81%, 37% 100%, 0 100%); }
    }
    @keyframes lightning {
      0%, 10%, 12.1%, 15%, 18.1%, 20%, 100% { color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 72% 71%, 61% 34%, 41% 35%, 29% 87%, 0% 100%);}
      10.1%, 12%, 15.1%, 18% { color: rgb(var(--rgb-white)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
    }
    @keyframes lightning-rainy {
      0%, 10%, 12.1%, 15%, 18.1%, 20%, 49.9% { color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 73% 62%, 77% 54%, 60% 36%, 38% 36%, 20% 51%, 23% 63%, 0% 100%);}
      10.1%, 12%, 15.1%, 18% { color: rgb(var(--rgb-white)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 73% 62%, 77% 54%, 60% 36%, 38% 36%, 61% 44%, 47% 100%, 0% 100%); } 
      50%, 100%{ color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 40% 99%, 58% 47%, 60% 36%, 38% 36%, 20% 51%, 23% 63%, 0% 100%); }
    }
    @keyframes sun-partly {
      50% { clip-path: polygon(0 67%, 18% 55%, 16% 31%, 41% 12%, 67% 24%, 77% 59%, 100% 64%, 100% 100%, 0 100%); }
    }
    @keyframes pouring {
      0%, 50%, 100% { clip-path: inset(0 0 0 0); }
      25% { clip-path: polygon(0 0, 100% 0, 100% 83%, 54% 83%, 62% 47%, 47% 46%, 38% 83%, 0 83%); }
      75%  { clip-path: polygon(0 0, 100% 0, 100% 70%, 75% 70%, 80% 48%, 63% 48%,
      54% 94%, 32% 94%, 46% 46%, 30% 46%, 23% 72%, 0 72%); }
    }
    @keyframes rainy {
      50% { clip-path: polygon(0 0, 100% 0, 100% 73%, 71% 73%, 50% 39%, 29% 73%, 0 73%); }
    }
    @keyframes snowy {
      50% { clip-path: polygon(0 0, 100% 0, 100% 100%, 65% 100%, 76% 73%, 57% 49%, 34% 56%, 26% 79%, 37% 100%, 0 100%); }
      51% { clip-path: inset(0 0 0 0); }
    }
    @keyframes snowy-rainy {
      0%, 32%, 100% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 79% 100%, 77% 71%, 70% 44%, 26% 43%, 13% 67%, 14% 100%, 0% 100%); }
      33%, 65.9% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 59% 100%, 56% 75%, 70% 44%, 26% 43%, 13% 67%, 14% 100%, 0% 100%); }
      66%, 99.9% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 79% 100%, 77% 71%, 70% 44%, 45% 39%, 62% 59%, 51% 100%, 0% 100%); }
    }
    @keyframes sunny {
      70% { transform: rotate(360deg) scale(1); }
      80% { transform: scale(1); }
      90% { transform: scale(1.15); }
      100% { transform: scale(1); }
    }
    @keyframes windy {
      0%, 100% { transform: scaleX(1.2); }
      30% { transform: scaleX(0.9); }
      45% { transform: scaleX(1.1); }
      75% { transform: scaleX(0.8); }
    }
    @keyframes windy-variant {
      0%, 50%, 100% { clip-path: inset(0 0 0 0); }
      25% { clip-path: inset(0 0 37% 0); }
    }

Bonjour,
c’est quoi qui ne fonctionne pas ?
j’ai testé vite fait :
popup7

Effectivement, c’est ok. J’avais fait une première tentative peut-être en allant tout de suite chercher des modifs à faire et qui me petaient les anims. J’avais gardé ça en mémoire sans réessayer. Désolé pour le dérangement.

1 « J'aime »

popup7

Sympa cette petite vue.
Tu la recupère depuis Meteo France?

Oui, j’ai utilisé l’intégration météo France. J’ai pas optimiser le code, c’étais juste pour tester.

type: vertical-stack
cards:
  - type: custom:mushroom-legacy-template-card
    primary: "{% set temps = {\n\t'clear-night': 'Nuit dégagée',\n\t'cloudy': 'Nuageux',\n\t'exceptional': 'Exceptionnel',\n\t'fog': 'Brouillard',\n\t'hail': 'Grêle',\n\t'lightning': 'rages',\n\t'lightning-rainy': 'Pluies orageuses',\n\t'partlycloudy': 'Eclaircies',\n\t'pouring': 'Averses',\n\t'rainy': 'Pluvieux',\n\t'snowy': 'Neige',\n\t'snowy-rainy': 'Pluie verglaçante',\n\t'sunny': 'Ensoleillé',\n\t'windy': 'Venteux',\n\t'windy-variant': 'Venteux variable'\n  } %}\n  {{ temps.get(states('weather.xxxx'), 'white')\n  }} -\n  {{ (state_attr('weather.xxxx', 'temperature') | float) |\n  round(1, default=0) | string | replace('.', ',') }} °C, ressenti\n  {{ (states('sensor.temperature_ressentie') |\n  float) | round(1, default=0) | string | replace('.', ',') }} °C"
    secondary: >-
      {% set rain = states('sensor.xxxx_rain_chance') | float(0) %}
    
      {% set rain_hour = states('sensor.xxxx_next_rain') | float(0) %}
        Min: {{ state_attr('sensor.weather_forecast_jour_xxxx','forecast')[0].templow | float(0) }}°C - Max: {{ state_attr('sensor.weather_forecast_jour_xxxx','forecast')[0].temperature | float(0) }}°C°C - 💨 {{ state_attr('sensor.weather_forecast_heure_xxxx','forecast')[0].wind_speed | int(0) }} km/h / {{ ['N','N-NE','NE','E-NE','E','E-SE','SE','S-SE','S','S-SO','SO','O-SO','O','O-NO','NO','N-NO','N'][((state_attr('sensor.weather_forecast_heure_xxxx', 'forecast')[0].wind_bearing | float + 11.25) / 22.5) | int(0) % 16] }} 
      {% if rain > 0 or rain_hour > 10 %}{% if rain > 0 %}🌧️ {{ rain | round(0) }}
      mm{% endif %}{% if rain > 0 and rain_hour > 10 %} - {% endif %}{% if rain_hour
      > 10 %}☔️🕐 {{ rain_hour | round(0) }}%{% endif %}
        {% endif %}
    icon: "{% set icons = {\n\t'clear-night': 'mdi:weather-night',\n\t'cloudy': 'mdi:weather-cloudy',\n\t'exceptional': 'mdi:weather-cloudy-alert',\n\t'fog': 'mdi:weather-fog',\n\t'hail': 'mdi:weather-hail',\n\t'lightning': 'mdi:weather-lightning',\n\t'lightning-rainy': 'mdi:weather-lightning-rainy',\n\t'partlycloudy': 'mdi:weather-partly-cloudy' if is_state('sun.sun', 'above_horizon') else 'mdi:weather-night-partly-cloudy',\n\t'pouring': 'mdi:weather-pouring',\n\t'rainy': 'mdi:weather-rainy',\n\t'snowy': 'mdi:weather-snowy',\n\t'snowy-rainy': 'mdi:weather-snowy-rainy',\n\t'sunny': 'mdi:weather-sunny',\n\t'windy': 'mdi:weather-windy',\n\t'windy-variant': 'mdi:weather-windy-variant'\n  } %}\n\n  {{ icons.get(states('weather.xxxx'),\n  'mdi:help-circle') }}"
    entity: weather.xxxx
    icon_color: "{% set colors = {\n\t'clear-night': 'amber',\n\t'cloudy': 'grey',\n\t'exceptional': 'red',\n\t'fog': 'grey',\n\t'hail': 'grey',\n\t'lightning': 'dark-grey',\n\t'lightning-rainy': 'dark-grey',\n\t'partlycloudy': 'orange',\n\t'pouring': 'blue',\n\t'rainy': 'light-blue',\n\t'snowy': 'grey',\n\t'snowy-rainy': 'grey',\n\t'sunny': 'amber',\n\t'windy': 'light-blue',\n\t'windy-variant': 'cyan'\n  } %}\n\n  {{ colors.get(states('weather.xxxx'), 'white')\n  }}"
    grid_options:
      columns: 12
      rows: 1
    tap_action:
      action: navigate
      navigation_path: /lovelace/meteo
    multiline_secondary: true
    hold_action:
      action: none
    double_tap_action:
      action: none
    card_mod:
      style: |
        ha-card {
          height: 54px !important;
        }
        ha-state-icon {
          {% set condition = states('weather.xxxx') %}
            {% if condition == 'clear-night' %} 
              animation: moon 10s linear infinite, stars 5s linear infinite;
            {% elif condition == 'cloudy' %} 
              animation: cloudy 10s ease-in-out infinite;
            {% elif condition == 'exceptional' %} 
              animation: exceptional 400ms ease-in-out infinite;
            {% elif condition == 'fog' %} 
              animation: cloudy 10s ease-in-out infinite, fog 4s infinite;
            {% elif condition == 'hail' %} 
              animation: cloudy 10s ease-in-out infinite, hail 2s infinite; 
            {% elif condition == 'lightning' %}
              animation: cloudy 10s ease-in-out infinite, lightning 4s infinite;
            {% elif condition == 'lightning-rainy' %}
              animation: cloudy 10s ease-in-out infinite, lightning-rainy 4s infinite; 
            {% elif condition == 'partlycloudy' %}
              {% if is_state('sun.sun', 'above_horizon') %}
                animation: cloudy 10s ease-in-out infinite, sun-partly 2s infinite;
              {% else %}
                position: relative;
                z-index: 1;
                animation: cloudy 10s ease-in-out infinite;
                /* animation: cloudy 10s ease-in-out infinite, moon-partly 10s linear infinite; */
              {% endif %}
            {% elif condition == 'pouring' %}
              animation: cloudy 10s ease-in-out infinite, pouring 1s infinite;
            {% elif condition == 'rainy' %}
              animation: cloudy 10s ease-in-out infinite, rainy 1.5s infinite; 
            {% elif condition == 'snowy' %}
              animation: cloudy 10s ease-in-out infinite, snowy 4s infinite;
            {% elif condition == 'snowy-rainy' %}
              animation: cloudy 10s ease-in-out infinite, snowy-rainy 4s infinite;
            {% elif condition == 'sunny' %}
              animation: sunny 8s ease-in-out infinite alternate;
            {% elif condition == 'windy' %}
              animation: windy 10s ease-in-out infinite; 
              transform-origin: 15% 50%
            {% elif condition == 'windy-variant' %}
              animation: cloudy 10s ease-in-out infinite, windy-variant 5s infinite;
            {% endif %}
        }
        ha-state-icon::after {
          content: "";
          position: absolute;
          inset: 0;
          background-color: rgba(73,52,22,1);
          clip-path: polygon(0 58%, 27% 58%, 34% 47%, 44% 42%, 55% 42%, 69% 47%, 74% 64%, 100% 67%, 100% 0, 0 0);
          opacity: 0;
          {% set condition = states('weather.xxxx') %}
            {% if condition == 'partlycloudy' %}
              {% if is_state('sun.sun', 'below_horizon') %}
                animation: moon-partly 5s ease-in-out infinite alternate 1s; /* vertraagde fade-in */
              {% endif %}
            {% endif %}
          z-index: 2;
          pointer-events: none;
        }
        @keyframes moon {
          0%, 100% { transform: rotate(12deg); }
          30% { transform: rotate(-6deg); }
          45% { transform: rotate(8deg); }
          75% { transform: rotate(-10deg); }
        }
        @keyframes moon-partly {
          to {
            opacity: 1;
          }
        }
        @keyframes stars {
          0%, 3.1%, 14.1% { clip-path: inset(0 0 0 0); }
          3% { clip-path: polygon(1% 1%, 0% 99%, 99% 100%, 99% 62%, 68% 62%, 62% 44%, 76% 34%, 100% 34%, 99% 0%); }
          14% { clip-path: polygon(1% 1%, 0% 99%, 99% 100%, 100% 25%, 51% 45%, 38%, 34%, 36% 0); }
        }
        @keyframes cloudy {
          0%, 100% { transform: translateX(3px); }
          30% { transform: translateX(-1px); }
          45% { transform: translateX(1.5px); }
          75% { transform: translateX(-3.2px); }
        }
        @keyframes exceptional {
          0%, 100% { transform: translate(0, 0)}
          20%  { transform: translate(0px, -0.3px)}
          40%  { transform: translate(0px, 0.3px)}
          60%  { transform: translate(0px, 0.3px)}
          80%  { transform: translate(0px, -0.3px)}
        }
        @keyframes fog {
          0%, 26%, 76%, 100% { clip-path: inset(0 0 0 0); }
          25% { clip-path: polygon(0 0, 100% 0, 100% 59%, 60% 59%, 60% 74%, 100% 74%,100% 100%, 0 100%); }
          75%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 26% 100%, 26% 76%, 0 76%);}
        }
        @keyframes hail {
          0%, 26%, 51%, 76%, 100% { clip-path: inset(0 0 0 0); }
          25% { clip-path: polygon(0 0, 100% 0, 100% 100%, 62% 100%, 47% 69%, 56% 55%, 43% 43%, 31% 58%, 48% 68%, 63% 100%, 0 100%); }
          50%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 62% 100%, 61% 86%, 74% 74%, 61% 60%, 46% 69%, 60% 87%, 63% 100%, 0 100%); }
          75%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 47% 100%, 56% 83%, 42% 68%, 27% 81%, 37% 100%, 0 100%); }
        }
        @keyframes lightning {
          0%, 10%, 12.1%, 15%, 18.1%, 20%, 100% { color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 72% 71%, 61% 34%, 41% 35%, 29% 87%, 0% 100%);}
          10.1%, 12%, 15.1%, 18% { color: rgb(var(--rgb-white)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
        }
        @keyframes lightning-rainy {
          0%, 10%, 12.1%, 15%, 18.1%, 20%, 49.9% { color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 73% 62%, 77% 54%, 60% 36%, 38% 36%, 20% 51%, 23% 63%, 0% 100%);}
          10.1%, 12%, 15.1%, 18% { color: rgb(var(--rgb-white)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 73% 62%, 77% 54%, 60% 36%, 38% 36%, 61% 44%, 47% 100%, 0% 100%); } 
          50%, 100%{ color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 40% 99%, 58% 47%, 60% 36%, 38% 36%, 20% 51%, 23% 63%, 0% 100%); }
        }
        @keyframes sun-partly {
          50% { clip-path: polygon(0 67%, 18% 55%, 16% 31%, 41% 12%, 67% 24%, 77% 59%, 100% 64%, 100% 100%, 0 100%); }
        }
        @keyframes pouring {
          0%, 50%, 100% { clip-path: inset(0 0 0 0); }
          25% { clip-path: polygon(0 0, 100% 0, 100% 83%, 54% 83%, 62% 47%, 47% 46%, 38% 83%, 0 83%); }
          75%  { clip-path: polygon(0 0, 100% 0, 100% 70%, 75% 70%, 80% 48%, 63% 48%,
          54% 94%, 32% 94%, 46% 46%, 30% 46%, 23% 72%, 0 72%); }
        }
        @keyframes rainy {
          50% { clip-path: polygon(0 0, 100% 0, 100% 73%, 71% 73%, 50% 39%, 29% 73%, 0 73%); }
        }
        @keyframes snowy {
          50% { clip-path: polygon(0 0, 100% 0, 100% 100%, 65% 100%, 76% 73%, 57% 49%, 34% 56%, 26% 79%, 37% 100%, 0 100%); }
          51% { clip-path: inset(0 0 0 0); }
        }
        @keyframes snowy-rainy {
          0%, 32%, 100% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 79% 100%, 77% 71%, 70% 44%, 26% 43%, 13% 67%, 14% 100%, 0% 100%); }
          33%, 65.9% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 59% 100%, 56% 75%, 70% 44%, 26% 43%, 13% 67%, 14% 100%, 0% 100%); }
          66%, 99.9% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 79% 100%, 77% 71%, 70% 44%, 45% 39%, 62% 59%, 51% 100%, 0% 100%); }
        }
        @keyframes sunny {
          70% { transform: rotate(360deg) scale(1); }
          80% { transform: scale(1); }
          90% { transform: scale(1.15); }
          100% { transform: scale(1); }
        }
        @keyframes windy {
          0%, 100% { transform: scaleX(1.2); }
          30% { transform: scaleX(0.9); }
          45% { transform: scaleX(1.1); }
          75% { transform: scaleX(0.8); }
        }
        @keyframes windy-variant {
          0%, 50%, 100% { clip-path: inset(0 0 0 0); }
          25% { clip-path: inset(0 0 37% 0); }
        }

bon j’ai dû raté un truc… pourtant j’ai l’update en V5.0.5

Je n’avais même pas fait attention que c’étais la template legacy, je pensais que c’étais la nouvelle template :sweat_smile:

edit:
la version nouveau template.

    type: custom:mushroom-template-card
    primary: "{% set temps = {\n\t'clear-night': 'Nuit dégagée',\n\t'cloudy': 'Nuageux',\n\t'exceptional': 'Exceptionnel',\n\t'fog': 'Brouillard',\n\t'hail': 'Grêle',\n\t'lightning': 'rages',\n\t'lightning-rainy': 'Pluies orageuses',\n\t'partlycloudy': 'Eclaircies',\n\t'pouring': 'Averses',\n\t'rainy': 'Pluvieux',\n\t'snowy': 'Neige',\n\t'snowy-rainy': 'Pluie verglaçante',\n\t'sunny': 'Ensoleillé',\n\t'windy': 'Venteux',\n\t'windy-variant': 'Venteux variable'\n  } %}\n  {{ temps.get(states('weather.xxxx'), 'white')\n  }} -\n  {{ (state_attr('weather.xxxx', 'temperature') | float) |\n  round(1, default=0) | string | replace('.', ',') }} °C, ressenti\n  {{ (states('sensor.temperature_ressentie') |\n  float) | round(1, default=0) | string | replace('.', ',') }} °C"
    secondary: >-
      {% set rain = states('sensor.xxxx_rain_chance') | float(0) %}

      {% set rain_hour = states('sensor.xxxx_next_rain') | float(0) %}
        Min: {{ state_attr('sensor.weather_forecast_jour_xxxx','forecast')[0].templow | float(0) }}°C - Max: {{ state_attr('sensor.weather_forecast_jour_xxxx','forecast')[0].temperature | float(0) }}°C°C - 💨 {{ state_attr('sensor.weather_forecast_heure_xxxx','forecast')[0].wind_speed | int(0) }} km/h / {{ ['N','N-NE','NE','E-NE','E','E-SE','SE','S-SE','S','S-SO','SO','O-SO','O','O-NO','NO','N-NO','N'][((state_attr('sensor.weather_forecast_heure_xxxx', 'forecast')[0].wind_bearing | float + 11.25) / 22.5) | int % 16] }} 
      {% if rain > 0 or rain_hour > 10 %}{% if rain > 0 %}🌧️ {{ rain | round(0)
      }} mm{% endif %}{% if rain > 0 and rain_hour > 10 %} - {% endif %}{% if
      rain_hour > 10 %}☔️🕐 {{ rain_hour | round(0) }}%{% endif %}
        {% endif %}
    icon: "{% set icons = {\n\t'clear-night': 'mdi:weather-night',\n\t'cloudy': 'mdi:weather-cloudy',\n\t'exceptional': 'mdi:weather-cloudy-alert',\n\t'fog': 'mdi:weather-fog',\n\t'hail': 'mdi:weather-hail',\n\t'lightning': 'mdi:weather-lightning',\n\t'lightning-rainy': 'mdi:weather-lightning-rainy',\n\t'partlycloudy': 'mdi:weather-partly-cloudy' if is_state('sun.sun', 'above_horizon') else 'mdi:weather-night-partly-cloudy',\n\t'pouring': 'mdi:weather-pouring',\n\t'rainy': 'mdi:weather-rainy',\n\t'snowy': 'mdi:weather-snowy',\n\t'snowy-rainy': 'mdi:weather-snowy-rainy',\n\t'sunny': 'mdi:weather-sunny',\n\t'windy': 'mdi:weather-windy',\n\t'windy-variant': 'mdi:weather-windy-variant'\n  } %}\n\n  {{ icons.get(states('weather.xxxx'),\n  'mdi:help-circle') }}"
    entity: weather.xxxx
    icon_color: "{% set colors = {\n\t'clear-night': 'amber',\n\t'cloudy': 'grey',\n\t'exceptional': 'red',\n\t'fog': 'grey',\n\t'hail': 'grey',\n\t'lightning': 'dark-grey',\n\t'lightning-rainy': 'dark-grey',\n\t'partlycloudy': 'orange',\n\t'pouring': 'blue',\n\t'rainy': 'light-blue',\n\t'snowy': 'grey',\n\t'snowy-rainy': 'grey',\n\t'sunny': 'amber',\n\t'windy': 'light-blue',\n\t'windy-variant': 'cyan'\n  } %}\n\n  {{ colors.get(states('weather.xxxx'), 'white')\n  }}"
    icon_tap_action:
      action: more-info
    tap_action:
      action: navigate
      navigation_path: /lovelace/meteo
    multiline_secondary: true
    hold_action:
      action: none
    double_tap_action:
      action: none
    card_mod:
      style: |
        ha-card {
          height: 54px !important;
        }
        ha-state-icon {
          {% set condition = states('weather.xxxx') %}
            {% if condition == 'clear-night' %} 
              animation: moon 10s linear infinite, stars 5s linear infinite;
            {% elif condition == 'cloudy' %} 
              animation: cloudy 10s ease-in-out infinite;
            {% elif condition == 'exceptional' %} 
              animation: exceptional 400ms ease-in-out infinite;
            {% elif condition == 'fog' %} 
              animation: cloudy 10s ease-in-out infinite, fog 4s infinite;
            {% elif condition == 'hail' %} 
              animation: cloudy 10s ease-in-out infinite, hail 2s infinite; 
            {% elif condition == 'lightning' %}
              animation: cloudy 10s ease-in-out infinite, lightning 4s infinite;
            {% elif condition == 'lightning-rainy' %}
              animation: cloudy 10s ease-in-out infinite, lightning-rainy 4s infinite; 
            {% elif condition == 'partlycloudy' %}
              {% if is_state('sun.sun', 'above_horizon') %}
                animation: cloudy 10s ease-in-out infinite, sun-partly 2s infinite;
              {% else %}
                position: relative;
                z-index: 1;
                animation: cloudy 10s ease-in-out infinite;
                /* animation: cloudy 10s ease-in-out infinite, moon-partly 10s linear infinite; */
              {% endif %}
            {% elif condition == 'pouring' %}
              animation: cloudy 10s ease-in-out infinite, pouring 1s infinite;
            {% elif condition == 'rainy' %}
              animation: cloudy 10s ease-in-out infinite, rainy 1.5s infinite; 
            {% elif condition == 'snowy' %}
              animation: cloudy 10s ease-in-out infinite, snowy 4s infinite;
            {% elif condition == 'snowy-rainy' %}
              animation: cloudy 10s ease-in-out infinite, snowy-rainy 4s infinite;
            {% elif condition == 'sunny' %}
              animation: sunny 8s ease-in-out infinite alternate;
            {% elif condition == 'windy' %}
              animation: windy 10s ease-in-out infinite; 
              transform-origin: 15% 50%
            {% elif condition == 'windy-variant' %}
              animation: cloudy 10s ease-in-out infinite, windy-variant 5s infinite;
            {% endif %}
        }
        ha-state-icon::after {
          content: "";
          position: absolute;
          inset: 0;
          background-color: rgba(73,52,22,1);
          clip-path: polygon(0 58%, 27% 58%, 34% 47%, 44% 42%, 55% 42%, 69% 47%, 74% 64%, 100% 67%, 100% 0, 0 0);
          opacity: 0;
          {% set condition = states('weather.xxxx') %}
            {% if condition == 'partlycloudy' %}
              {% if is_state('sun.sun', 'below_horizon') %}
                animation: moon-partly 5s ease-in-out infinite alternate 1s; /* vertraagde fade-in */
              {% endif %}
            {% endif %}
          z-index: 2;
          pointer-events: none;
        }
        @keyframes moon {
          0%, 100% { transform: rotate(12deg); }
          30% { transform: rotate(-6deg); }
          45% { transform: rotate(8deg); }
          75% { transform: rotate(-10deg); }
        }
        @keyframes moon-partly {
          to {
            opacity: 1;
          }
        }
        @keyframes stars {
          0%, 3.1%, 14.1% { clip-path: inset(0 0 0 0); }
          3% { clip-path: polygon(1% 1%, 0% 99%, 99% 100%, 99% 62%, 68% 62%, 62% 44%, 76% 34%, 100% 34%, 99% 0%); }
          14% { clip-path: polygon(1% 1%, 0% 99%, 99% 100%, 100% 25%, 51% 45%, 38%, 34%, 36% 0); }
        }
        @keyframes cloudy {
          0%, 100% { transform: translateX(3px); }
          30% { transform: translateX(-1px); }
          45% { transform: translateX(1.5px); }
          75% { transform: translateX(-3.2px); }
        }
        @keyframes exceptional {
          0%, 100% { transform: translate(0, 0)}
          20%  { transform: translate(0px, -0.3px)}
          40%  { transform: translate(0px, 0.3px)}
          60%  { transform: translate(0px, 0.3px)}
          80%  { transform: translate(0px, -0.3px)}
        }
        @keyframes fog {
          0%, 26%, 76%, 100% { clip-path: inset(0 0 0 0); }
          25% { clip-path: polygon(0 0, 100% 0, 100% 59%, 60% 59%, 60% 74%, 100% 74%,100% 100%, 0 100%); }
          75%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 26% 100%, 26% 76%, 0 76%);}
        }
        @keyframes hail {
          0%, 26%, 51%, 76%, 100% { clip-path: inset(0 0 0 0); }
          25% { clip-path: polygon(0 0, 100% 0, 100% 100%, 62% 100%, 47% 69%, 56% 55%, 43% 43%, 31% 58%, 48% 68%, 63% 100%, 0 100%); }
          50%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 62% 100%, 61% 86%, 74% 74%, 61% 60%, 46% 69%, 60% 87%, 63% 100%, 0 100%); }
          75%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 47% 100%, 56% 83%, 42% 68%, 27% 81%, 37% 100%, 0 100%); }
        }
        @keyframes lightning {
          0%, 10%, 12.1%, 15%, 18.1%, 20%, 100% { color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 72% 71%, 61% 34%, 41% 35%, 29% 87%, 0% 100%);}
          10.1%, 12%, 15.1%, 18% { color: rgb(var(--rgb-white)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
        }
        @keyframes lightning-rainy {
          0%, 10%, 12.1%, 15%, 18.1%, 20%, 49.9% { color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 73% 62%, 77% 54%, 60% 36%, 38% 36%, 20% 51%, 23% 63%, 0% 100%);}
          10.1%, 12%, 15.1%, 18% { color: rgb(var(--rgb-white)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 73% 62%, 77% 54%, 60% 36%, 38% 36%, 61% 44%, 47% 100%, 0% 100%); } 
          50%, 100%{ color: rgb(var(--rgb-dark-grey)); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 40% 99%, 58% 47%, 60% 36%, 38% 36%, 20% 51%, 23% 63%, 0% 100%); }
        }
        @keyframes sun-partly {
          50% { clip-path: polygon(0 67%, 18% 55%, 16% 31%, 41% 12%, 67% 24%, 77% 59%, 100% 64%, 100% 100%, 0 100%); }
        }
        @keyframes pouring {
          0%, 50%, 100% { clip-path: inset(0 0 0 0); }
          25% { clip-path: polygon(0 0, 100% 0, 100% 83%, 54% 83%, 62% 47%, 47% 46%, 38% 83%, 0 83%); }
          75%  { clip-path: polygon(0 0, 100% 0, 100% 70%, 75% 70%, 80% 48%, 63% 48%,
          54% 94%, 32% 94%, 46% 46%, 30% 46%, 23% 72%, 0 72%); }
        }
        @keyframes rainy {
          50% { clip-path: polygon(0 0, 100% 0, 100% 73%, 71% 73%, 50% 39%, 29% 73%, 0 73%); }
        }
        @keyframes snowy {
          50% { clip-path: polygon(0 0, 100% 0, 100% 100%, 65% 100%, 76% 73%, 57% 49%, 34% 56%, 26% 79%, 37% 100%, 0 100%); }
          51% { clip-path: inset(0 0 0 0); }
        }
        @keyframes snowy-rainy {
          0%, 32%, 100% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 79% 100%, 77% 71%, 70% 44%, 26% 43%, 13% 67%, 14% 100%, 0% 100%); }
          33%, 65.9% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 59% 100%, 56% 75%, 70% 44%, 26% 43%, 13% 67%, 14% 100%, 0% 100%); }
          66%, 99.9% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 79% 100%, 77% 71%, 70% 44%, 45% 39%, 62% 59%, 51% 100%, 0% 100%); }
        }
        @keyframes sunny {
          70% { transform: rotate(360deg) scale(1); }
          80% { transform: scale(1); }
          90% { transform: scale(1.15); }
          100% { transform: scale(1); }
        }
        @keyframes windy {
          0%, 100% { transform: scaleX(1.2); }
          30% { transform: scaleX(0.9); }
          45% { transform: scaleX(1.1); }
          75% { transform: scaleX(0.8); }
        }
        @keyframes windy-variant {
          0%, 50%, 100% { clip-path: inset(0 0 0 0); }
          25% { clip-path: inset(0 0 37% 0); }
        }

C’est justement ce qui m’a surpris dans ta réponse. J’ai juste viré le legacy et ça a continué à fonctionner alors qu’il me semble que ça n’avait pas été le cas au début.