Show image depending on input_text

I try to get the status of a device represented by an image. What is the best way to do this?

I was thinking about making conditional badges (10+) and just show the state (string). But there might be better solutions.

Btw. the badges don’t seem to work with states (it just shows always):

    badges:
      - entity: sensor.test
        state_filter: "Unbekannt"
        image: /local/badges/problem.png
        name: ""

You cannot use the frontend state display, but the backend state term unknown. Check the proper spelling under Developer Tools > Services.

Some people use template sensors for this to get a whole bunch of it in one.

Sorry that wasn’t clear. This is a template sensor showing exactly this and other states. There must be another mistake.

Ah, ok. But I’ve overlooked the type. Correctly it’s


type: entity-filter

    badges:
      type: entity-filter
        - entity: sensor.test
          state_filter: "Unbekannt"
          image: /local/badges/problem.png
          name: ""

Where do I put the type?

When you compare once more with the documentation examples, you’ll see that it has to be


    badges:
      - type: entity-filter
        entities:
          - entity: …
            name: …
            image: /local/…
            state_filter:
              - 'Unbekannt' 
        show_empty: false

1 Like

Thanks a lot.

Wild cards or are probably not supported, right?

Also, is it possible to use actions on tap?