#Setting dashboard background to entity value - possible?

1 messages · Page 1 of 1 (latest)

chilly galleon
#

According to AI, this is the way - but it doesn't work. Any suggestions?

    title: Test
    path: test
    background:
      image: {{ states('sensor.unsplash_background') }}
    sections:
      - type: grid
        cards:
          - type: heading
            heading: New section```

I've also tried

```image: sensor.unsplash_background```

But also not working.
queen holly
#

Nope neither of those are valid

chilly galleon
#

Any idea on how to solve it? @queen holly

tawny quiver
#

According to AI,
First mistake...

It doesn't look like the background key accepts templates.
You might be able to set up an automation that can take the sensor state and copy the referenced file to a static filename such as /local/background.jpg. When the dashboard is refreshed, the new image would be shown provided there isn't any caching issues.