Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.44k stars 39 forks source link

Sub button does not show entity icon #465

Closed marcokreeft87 closed 2 months ago

marcokreeft87 commented 2 months ago

Sub button does not show entity icon. The entity in question is of class motion so should show a motion icon

Expected behavior Show the icon of the entity

Screenshots image

Informations (please complete the following information):

Clooos commented 2 months ago

Thank you for the feedback, indeed I need to do some more work on the icons, this is already in my to-do list.

marcokreeft87 commented 2 months ago

Love the feature tho. I created the exact same thing with a button type and mushroom Template in a stack in card haha

marcokreeft87 commented 2 months ago

@Clooos I was looking through your code and the only difference I see in getting the icon is that you use

_hass.states[entity]?.attributes[attribute]

and I use

stateObj.attributes.icon

But that should both work..

https://github.com/marcokreeft87/room-card/blob/master/src/entity.ts

Clooos commented 2 months ago

This issue is now fixed in the new beta!

https://github.com/Clooos/Bubble-Card/releases/tag/v2.0.0-beta.3