#trouble with backround image on weather card

1 messages · Page 1 of 1 (latest)

ornate bough
#

hey there im quite new to home assistant and yaml as a whole and im havging a big of trouble adding and background to a weather card

here is the code that i have

type: weather-forecast
entity: weather.forecast_home
forecast_type: daily
show_current: true
show_forecast: true
style: |
ha-card {
background-image: url('/local/pictures/stormy-weather.jpg'); # Correct the image URL
background-size: cover; # Cover the entire card
background-position: center; # Center the image
color: white; # Optional: change the text color to make it visible on the background
}

im unsure as to why it isnt working as i have my images in the www folder in a pictures folder

i have also asked chat gpt but it hasnt been too helpful.

any help would be greatly appreciated cheers

strange estuary
#

style is not a supported property of weather-forecast card.

#

You'll need something like card-mod if you want to modify individual cards.

ornate bough
#

yeah i have card mod installed im not entirely sure why its not working like do i have to use a card mod specific card type ?

#

am i missing something to say it should use card mod ?

strange estuary
#

The config should have card_mod: somewhere in it. I dont use it though so you'll have to look up the exact usage.

cobalt nymph
#

If you're referencing an example that is a couple of years old, card_mod did not require the card_mod: key. Try adding it before the style line and indent everything beneath it by two spaces.