nathan-gs / ha-map-card

A Map Card for Home Assistant
https://community.home-assistant.io/t/map-card-a-slightly-improved-map-card/693088
MIT License
23 stars 5 forks source link

“size” and “color” entity attributes do not affect icon display #74

Open boozer2 opened 1 month ago

boozer2 commented 1 month ago

When using “display: icon” for entities, the “size” and “color” attributes do not apply to the icon, only to the circle around the icon. I would expect this would change the size and color of the icon itself, or at least I would like a way to do that even if it’s a different attribute like “icon_size”.

Example YAML:

type: custom:map-card
entities:
  - entity: geo_location.lightning_strike_6ab35004ddee42cea27ed40b8568a710
    display: icon
    size: 6
    color: Yellow
  - entity: geo_location.lightning_strike_81cb982332524bc092e7c25b3dbd9b27
    display: icon
    size: 100
    color: Red

Example result: IMG_5373

The color only affects the circle around the displayed entity, and the size affects the size of the circle.

Also, for “display: icon” I would prefer no circle at all, or at least a way to remove it (which I can do now by using a very small “size”)

Thanks!

nathan-gs commented 1 month ago

A bit of a workaround, use the style property on the entity to override the color of the icon.