Soucis d'icones

Bonjour à tous

Je suis débutant dans home assistant et à ce jour je fais mon apprentissage en analysant des choses faites par la communauté.

J’ai fais une copie d’une application lovelace pour un système audio arylic, la partie code fonctionne derrière mais pour la carte, les commandes d’icones ne fonctionnent pas, avez vous une idée?
(le statut et l’affichage de volume fonctionne, ce sont les commandes icon qui n’affiche rien sur la carte)
Merci pour votre aide

type: picture-elements
Title: SDE
image: >-
  https://cdn.vincenzocaputo.com/getimage/i=2925-c=21179-w=905-q=80/sfondo-amplificatore.webp
elements:
  - type: state-label
    entity: sensor.status_arylic
    style:
      top: 5%
      right: 10%
      color: 'rgb(255, 255, 255)'
      transform: 'translate(0%,-50%)'
      pointer-events: none
      text-shadow: 1px 1px black
      font-family: Trebuchet MS
      font-size: 90%
      font-weight: bold
      border-right-style: solid
      border-color: 'rgb(87, 21, 125)'
      background-color: 'rgba(0, 0, 0, 0.8)'
      opacity: 0.8
  - type: state-label
    entity: sensor.volume_arylic
    style:
      top: 90%
      right: 60%
      color: 'rgb(255, 255, 255)'
      transform: 'translate(0%,-50%)'
      pointer-events: none
      text-shadow: 1px 1px black
      font-family: Trebuchet MS
      font-size: 90%
      font-weight: bold
      border-right-style: solid
      border-color: 'rgb(87, 21, 125)'
      background-color: 'rgba(0, 0, 0, 0.8)'
      opacity: 0.8
  - type: icon
    icon: 'mdi:volume-plus'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.volume_plus_arylic
      entity_id: script.volume_plus_arylic
      style:
        color: 'rgb(255, 255, 255)'
        right: 50%
        top: 50%
  - type: icon
    icon: 'mdi:volume-minus'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.volume_moins_arylic
      entity_id: script.volume_moins_arylic
      style:
        color: 'rgb(87, 21, 125)'
        right: 90%
        top: 90%
  - type: icon
    icon: 'mdi:volume-off'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.mute_arylic
      entity_id: script.mute_arylic
      style:
        color: 'rgb(87, 21, 125)'
        right: 80%
        top: 90%
  - type: icon
    icon: 'mdi:skip-backward'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.previous_track
      entity_id: script.previous_track
      style:
        color: 'rgb(87, 21, 125)'
        right: 90%
        top: 5%
  - type: icon
    icon: 'mdi:stop'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.stop_arylic
      entity_id: script.stop_arylic
      style:
        color: 'rgb(87, 21, 125)'
        right: 80%
        top: 5%
  - type: icon
    icon: 'mdi:play'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.play_arylic
      entity_id: script.play_arylic
      style:
        color: 'rgb(87, 21, 125)'
        right: 70%
        top: 5%
  - type: icon
    icon: 'mdi:pause'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.pause_arylic
      entity_id: script.pause_arylic
      style:
        color: 'rgb(87, 21, 125)'
        right: 60%
        top: 5%
  - type: icon
    icon: 'mdi:skip-forward'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.next_track
      entity_id: script.next_track
      style:
        color: 'rgb(87, 21, 125)'
        right: 50%
        top: 5%
  - type: icon
    icon: 'mdi:repeat'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.loop_track
      entity_id: script.loop_track
      style:
        color: 'rgb(87, 21, 125)'
        right: 40%
        top: 5%
  - type: icon
    icon: 'mdi:repeat-off'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.no_loop
      entity_id: script.no_loop
      style:
        color: 'rgb(87, 21, 125)'
        right: 30%
        top: 5%
  - type: icon
    icon: 'mdi:shuffle-variant'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.loop_random
      entity_id: script.loop_random
      style:
        color: 'rgb(87, 21, 125)'
        right: 20%
        top: 5%

Tu as la source ?

L’indentation n’est pas bonne pour toutes les cartes icon :

Devrait être (pour entity_id et style)

  - type: icon
    icon: 'mdi:repeat-off'
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.no_loop
    entity_id: script.no_loop
    style:
      color: 'rgb(87, 21, 125)'
      right: 30%
      top: 5%

Ah merci, je dois dire que c’est pas simple a aborder, j’ai mis un moment à comprendre la différence entre les 2 :smiley:
la source est ici, et le tabulation n’y est pas évidente

Merci encore, du temps à passer pour apprendre toutes ces subtilités

Il y a l’erreur dans le code donné… :innocent:

et bien très bonne analyse :wink:

j’ai un petit soucis encore avec le volume, mais je vais y regarder tranquillement demain, essayer de comprendre le pourquoi :smiley:

Hello,

Merci pour le post et surtout pour les réponses. J’ai trouvé la solution pour le volume. Il semble que des traductions se baladent. Dans la picture card, il faut mettre : script.volume_piu_arylic et script.volume_meno_arylic à la place de script.volume_plus_arylic et script.volume_moins_arylic.

Avez-vous tenté de récuperer les infos des titres en cours ?