Badge State Image

Did you end up getting anywhere with this?
I’m trying to achieve something similar…

I didn’t sorry @AJG. Other things became more important - I do hope to come back to it at some stage though. Do reply here if you have a crack at it!

For anyone asking - I believe it is possible using card-mod, take a look.

scrap it. properly asked question is at least 50% of the answer :frowning:

Card mod lets you mod the look of what’s presented, he wants to switch words for icons. He’ll have to use something that allows him to adjust what the field returns. That’s not card mod.

@bnutt Ben, how do you get the picture of you and Sarah in the badge?

Can you post the config and the file name in which the config goes.

Thanks

Now that’s a question I can answer… Just need to upload the images - mine are in the www/images subfolder, which resides in the config folder (where configuration.yaml exists). If this doesn’t exist (either www or images) you can create them - but from memory you need to restart HA for them to be picked up.

When your images are there, you should be able to browse to the image directly by navigating to homeassistant.local/local/images/person.jpg (of course, replace homeassistant.local with whatever domain you use).

Then you need to use the customize functionality of HA to associate the image with the person entity. I have customize broken out to another file as per the below snippits.

#configuration.yaml
customize: !include customize.yaml
#customize.yaml
person.ben:
  entity_picture: "/local/images/ben.jpg"
person.sarah:
  entity_picture: "/local/images/sarah.jpg"

Hope that works for you!

This topic seems to be related to my issue at hand so I will piggy-back here…
The text inside my badges is too large when displayed on the app.
They are fine in a browser. What can be done?


But then I have still the state as word and not the icon displayed, haven’t I?

badges:
  - type: entity-filter
    entities:
      - entity: light.test
        name: Me
        icon: mdi:home-account
    state_filter:
      - "on"

shows “on” and not the icon with state, e.g. a yellow or grey lightbulb?

I came to this post, because I searched for the same. I want to have the state icon displayed, as in every entity card, etc. instead of the entity state as a word. This is still not possible? Same es in standard for sun.sun. updates, motion sensor, … But wanted for lights, shutter, etc.

image

I wonder, why there is a icon attribute here, if no icon is shown? Or what is about my-custom-badge here. Unfortunately there are no examples for custom badge types there.

The contents inside the badge circle are not configurable, they are based on the domain type. A light by default shows the state in the circle. That documentation is wrong or out of date.

That would be fine and is the same on the left site of the entity card, etc., where the lightbulb for lights is shown. I only want to have the lightbulb from the light entity shown (on or off) instead of the written state “on” or “off”. Based on domain type is completely fine, but with icon instead of text. Same as for sun.sun, motion sensor, HA update, …

Yes, but what you aren’t understanding is that you can’t customize them. They are what they are. If you want something like that, make a glance card that conditionally appears. Or you can get inventive with panel mode and a header and a glance card. Base badges are not visually configurable aside from turning things on and off.

What a pity. But thanks for this information. I hope, that this will be changed in the future. E.g. to be able to choose what to display inside of the circle and what is displayed as text below.

What I now get on my own and missed as a newbie hint, is to create additionally binary sensors of this devices, e.g. light-state and use them. Then I have a lightbulb icon, if I choose this.

image

More or less what I wanted. Try to set the rest (color, etc.) with card-mod afterwards.

I doubt it at this point. It’s been 5 years since we’ve seen any change to these. Most people do not use them from what I can tell. You can always customize them yourself with custom cards.

Did the sun badge get changed in the last update? It use to have an image in the middle of the badge. It is blank for me now.

No clue, sorry!

Thanks. I’ll post the question in discord front end.

1 Like

No answers anywhere on my my sun badge image is gone (lost it a couple of updates ago). Your comment says they are not configurable. How do I get it back or can I use a different image in it?
It is back. Not sure how are why, I just played with the badge setting it to

entity: sun.sun - original - blank
entity: sensor.sun - failed 
then back to:
entity: sun.sun - worked.

strange

Very odd. Oh well, at least it’s fixed.

I hate when things break and then fix without understanding why?

Also can the font size in the badge be changed. With the new method for the system version I can no longer see what is the latest version available in the badge.