Person : change image from entity state

Hello,
i googled a lot and search in community but i don’t find answer to this question.
I use a card (Verticale stak) with entities as button (in order to navigate between tabs).
here is my code :

type: vertical-stack
cards:
  - type: entities
    entities:
      - type: buttons
        entities:
          - entity: person.guillaume
            tap_action:
              action: navigate
              navigation_path: /lovelace/presence
            state_filter:
              home: grayscale(0%)
              not_home: grayscale(100%)
          - entity: person.steph
            state_color: true
            tap_action:
              action: navigate
              navigation_path: /lovelace/presence
          - entity: person.hugo
            state_color: true
            tap_action:
              action: navigate
              navigation_path: /lovelace/presence
          - entity: person.noa
            state_color: true
            tap_action:
              action: navigate
              navigation_path: /lovelace/presence

and what is looks like :

I just want to show grayscale image if person status is not ‘home’
I try to use state_filter option but without success.
I there a solution to show state as i like ?
Thanks.

All options are covered in the docs. If you don’t see an option you want in the docs, it doesn’t exist. state_filter isn’t a valid option for buttons. state_filter is only available on entity_filter. You cannot mix and match configurations.

With that being said, your only built in options are picture_elements which allows you to change style of items but you have to build the card yourself. Going the custom route, you can use card-mod, custom:button-card, or any templating card.

thanks for these explanations.

After reading the doc of Button-card, i don’t find a way to have “person” showed as the entity show : 4 person (buttons) on a single row in a vertical-stack card.

Take a look at the state_image of the Picture Entity Card.

1 Like

Hello, i found a solution with “custom button”.