Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96123

Dynamic image from sensor value

$
0
0

@Mrianphill wrote:

Hi noob here,

I have a picture-element card to show a football match. I’m trying to add the club badge next to each team using an image as below but the image is not showing up, just a grey missing image box.

- type: image
  entity: sensor.next_liverpool_fixture_away_team
  image: >
         "/local/images/football/" + {{ sensor.next_liverpool_fixture_away_team }} +".svg"
  style:
      top: 35%
      left: 30%
      width: 5%
      transform: translate(0%,0%)

I have tried setting image : “/local/images/football/Liverpool.svg” and that works as expected and {{ sensor.next_liverpool_fixture_away_team }} returns Liverpool so the path would be the same.

Am I doing something wrong or is it not possible to do it this way?

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 96123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>