aristosv
(Aristos)
April 3, 2020, 2:12pm
1
In the button card documentation it says I can use the variable “icon” to overwrite icon or entity picture. So I did this:
- type: vertical-stack
title: Cartoons
cards:
- type: button
entity: script.disneyxd
icon: /local/disney_xd.jpg
icon_height: 50px
icon_width: 50px
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.disneyxd
and placed “disney_xd.jpg” inside the “www” folder
The result was that the default icon disappeared.
What I’m I doing wrong here?
Did you refresh your browser cache with Shift + F5?
aristosv
(Aristos)
April 3, 2020, 2:26pm
3
yes, I did, this was the result.
AhmadK
(akasma74)
April 4, 2020, 6:43am
5
if you replace it with something like icon: mdi:door-open
, does it make any difference?
aristosv
(Aristos)
April 4, 2020, 6:58am
6
AhmadK:
mdi:door-open
Yes, this code
- type: vertical-stack
title: Cartoons
cards:
- type: button
entity: script.disneyxd
icon: mdi:door-open
icon_height: 50px
icon_width: 50px
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.disneyxd
Shows me this icon
AhmadK
(akasma74)
April 4, 2020, 7:12am
7
my guess is you can only use icons with this card, i.e something like ‘mdi:xxx’.
to show pictures you need to use a different standard or custom card.
Yeah I assumed the same, but in the docs it says icon or entity picture, that’s what confused me.
aristosv
(Aristos)
April 4, 2020, 7:52am
9
I really don’t know what to make of this
AhmadK
(akasma74)
April 4, 2020, 8:39am
10
well, that “Entity Domain Icon” confuses me.
I’ll have a look at the code when I have time
“Entity domain icon” means the icon associated with that domain. Ie, for temperature, it will show the thermometer. This is entirely different from entity id picture.
You can override with another icon but not with a local image.
AhmadK
(akasma74)
April 4, 2020, 8:02pm
12
I know that.
I’ve no idea what it is, expected it to be just a picture.
I have to say it’s not the same as “Overwrites icon or entity picture”.
I’ll create a docs PR.
UPDATE: PR merged so there is no more confusion now as it clearly says “Icon”