marcokreeft87 / room-card

Show multiple entity states, attributes and icons in a single card in Home Assistant's Lovelace UI
MIT License
228 stars 38 forks source link

cannot get background-image to work #306

Closed RedNo7 closed 9 months ago

RedNo7 commented 9 months ago

Which version of Room Card? 1.08.02

Describe the bug I have an image: /www/images/hallway.jpg

When I use it in a picture card it works, but when I use its in custom:room-card, it doesn't:

Screenshots Screenshot 2024-01-28 at 11 56 35

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

YAML

- type: picture
  image: /local/images/hallway.jpg

- type: custom:room-card
  entity: light.hallway
  styles:
    background-image: url('/local/images/hallway.jpg')
  ...
marcokreeft87 commented 9 months ago

You need to use card_styles in stead of styles. The styles will be applied to the entity and not the card.