Images with presence detection

Hi,
I’m sorry for the question, but I am newbie with home assistant.
I am trying to change my picture in the badge based on the status “home” and “not_home”, but I have some problems to do it.

Thanks

It’s a lot easier if you show us how far you have come.
That way someone can just correct the error and give you code that works, else we have to create a generic code that you still have to edit for your enteties.

Thanks fot he answer.
I cancelled every configurations about this, because I am newbie about HA, and I don’t want be confused if I leave some code that it’s not working :slight_smile:
Can you explain me the simpler way to do this?

Thanks

I don’t use badges myself but looking at this:

then I assume something like:

badges:
  - type: entity-filter
    entities:
      - entity: person.me
        name: Me
        icon: mdi:home-account
    state_filter:
      - "home"
  - type: entity-filter
    entities:
      - entity: person.me
        name: Me
        icon: mdi:away # don't know if that icon exists. just an example
    state_filter:
      - "away"

Nothing, I received the error Exception: bad indentation of a mapping entry at line 8, column 15: icon: mdi: home-account when I try to save

Other solutions? :slight_smile:
Thanks