How to set background image for weather card using card-modder

Continuing the discussion from My Lovelace Plugins:

@maurizio53, continue here :wink:

Ah ok great.
I checked also if there was an owner error, but all the files have the same owner (homeassistant).
Here it is the complete card:

  - type: custom:card-modder
    style:               
      background-image: url("/local/lovelace/images/weather-background-[[ sun.sun.state ]].png")
      background-size: 100% 400px
      --primary-text-color: 'rgb(76,156,241)'
      --secondary-text-color: green
      --paper-item-icon-color: 'rgb(76,156,241)' #small variation icons
      background-repeat: no-repeat
      border-radius: 20px
      border: solid 1px rgba(100,100,100,0.3)
      color: green
      box-shadow: 3px 3px rgba(0,0,0,0.4)`Preformatted text`
    card:
      type: custom:dark-sky-weather-card
      title: Meteo
      entity_weather: weather.meteo_darksky
      entity_sun: sun.sun
      entity_daily_summary: sensor.dark_sky_daily_summary
      entity_current_conditions: sensor.dark_sky_icon  
      entity_humidity: sensor.dark_sky_humidity
      entity_pressure: sensor.dark_sky_pressure
      entity_temperature: sensor.dark_sky_temperature
      entity_visibility: sensor.dark_sky_visibility
      entity_wind_bearing: sensor.dark_sky_wind_bearing
      entity_wind_speed: sensor.dark_sky_wind_speed
      entity_forecast_high_temp_0: sensor.dark_sky_daytime_high_temperature_0
      entity_forecast_high_temp_1: sensor.dark_sky_daytime_high_temperature_1
      entity_forecast_high_temp_2: sensor.dark_sky_daytime_high_temperature_2
      entity_forecast_high_temp_3: sensor.dark_sky_daytime_high_temperature_3
      entity_forecast_high_temp_4: sensor.dark_sky_daytime_high_temperature_4
      entity_forecast_high_temp_5: sensor.dark_sky_daytime_high_temperature_5
      entity_forecast_low_temp_0: sensor.dark_sky_overnight_low_temperature_0
      entity_forecast_low_temp_1: sensor.dark_sky_overnight_low_temperature_1
      entity_forecast_low_temp_2: sensor.dark_sky_overnight_low_temperature_2
      entity_forecast_low_temp_3: sensor.dark_sky_overnight_low_temperature_3
      entity_forecast_low_temp_4: sensor.dark_sky_overnight_low_temperature_4
      entity_forecast_low_temp_5: sensor.dark_sky_overnight_low_temperature_4
      entity_forecast_icon_1: sensor.dark_sky_icon_1
      entity_forecast_icon_2: sensor.dark_sky_icon_2
      entity_forecast_icon_3: sensor.dark_sky_icon_3
      entity_forecast_icon_4: sensor.dark_sky_icon_4
      entity_forecast_icon_5: sensor.dark_sky_icon_5

And this is the screenshot of the card actually…

05

Problem is that i don’t get any image on the card… Any hints?
EDIT: I noticed that if i choose an image not depending from a template, the image is shown as background, so i think the issue is or about the names of the images or about the sun.sun.state.

only thing I can think of now is the name of the image.

it should be showing:
30

  - type: custom:card-modder
    style:
      background-image: url("/local/lovelace/images/weather-background-[[ sun.sun.state ]].png")
      background-size: 100% 400px
      --primary-text-color: var(--primary-text-color)
      --secondary-text-color: var(--secondary-text-color)
      --paper-item-icon-color: var(--primary-text-color) #small variation icons
    card:
      type: custom:weather-card
      title: Modded Woensdrecht
      entity_weather: weather.woensdrecht
      entity_sun: sun.sun
      entity_apparent_temperature: sensor.jagti_windchill
      entity_wind_force: sensor.br_wind_force

although I confess this is not with the dark sky weather component. Which shouldn’t be any issue if it is only about the background…

maybe start debugging only with the background, and leave the other options out for now

How to start a debugging?