Carte de personne avec button card et image de fonds variable

Bonjour,

Je souhaite réaliser une carte de personne avec différentes infos.

Je souhaite que mon image change en fonction de la position.

En fonction de celle-ci j’agrémente "input-text.BLou .

Après avoir suivi les différentes possibilités figurant sur les différents forum Français et anglais.

Celà reste vain.

mon image est blanche avec un point d’interrogation :

Capture d'écran 2024-12-12 081515

Voyez vous ce qui cloche ?

j’ai essayé de mettre des ’ autour de l’adresse des images, mais à l’enregistrement HA les fait disparaitre.

Encore une fois, je remercie par avance les pros d’HA pour leur dévouement et vous souhaite une agréable journée

Mon code:

type: custom:button-card
entity: input_text.blou
aspect_ratio: 2/1
show_name: false
show_background-image: true
state:
  - value: maison
    background-image: /local/images/BL_maison.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: promenade
    background-image: /local/images/BL_promenade.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: famille
    background-image: local/images/BL_famille.png
    styles:
      card:
        - padding: 4%
        - background-size: 80%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: shopping
    background-image: /local/images/BL_shopping.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: véto
    background-image: /local/images/BLveto.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: café
    background-image: /local/images/BL_cafe.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: apéro
    background-image: /local/images/BL_apero.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: unknown
    background-image: /local/images/BL_cherche.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: indisponible
    background-image: /local/images/BL_cherche.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
  - value: en chemin
    background-image: /local/images/BL_voiture.png
    styles:
      card:
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center center
        - "--keep-background": "true"
card_mod:
  style: |

    ha-card {
      background: white;
      border: 1.5px outset white;

Bonjour,
voici un exemple:

type: custom:button-card
entity: sensor.personne_warcozes
aspect_ratio: 2/1
show_name: false
state:
  - value: Maison
    styles:
      card:
        - background-image: url("/local/images/sud radio.png")
        - padding: 4%
        - background-size: 40%
        - background-repeat: no-repeat
        - background-position: center
        - "--keep-background": true
styles:
  card:
    - background: white
    - border: 1.5px outset white
1 « J'aime »