Lovelace badge: why does the icon not change?

Hi,
I want to change the color of the icon of a badge in Lovelace depending on the state, but I even fail to change the icon

I have the below in my raw lovelace configuration editor, but I am not getting the expected result.

views:
  - title: Home
    badges:
      - entity: input_boolean.sprinklersprog1       
        type: state-label
        name: test
        icon: 'mdi:home'
        show_icon: true

I can see the badge, it also gets the name “test”, but I want it to have the “home” icon


Reading the documentation at https://www.home-assistant.io/lovelace/badges/ this should work, but it does not in my setup. It does not provide any error nor lead on how to troubleshoot…it just ignores my input.

Any tips on what I am missing? I’m pretty “new” at this, so I may be missing the “obvious” thing here.
thanks so much in advance for any clues,
chrisV

So badges will only display icons when they are specific domain types. Input_booleans (the domain you’re using) will always only show the translated state inside the badge.

thank you @petro
That is good to know.
I will suggest an edit on the documentation page so that others don’t lose hours like I did.
Any idea which domains do accept the replacement of the icons?
thanks again,
chris

I think binary_sensors are the only domain that show an icon. All the rest have states inside the circle.