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

How to use templates with picture-elements card?

$
0
0

@csacre wrote:

Hi,

I start playing with the “picture-elements”.
I would like to change dynamically the background-color when the “humidity” of one sensor is above 50% (visual feedback, kind of alerting).

I am back to even a more basic question: is templating supported in this card ?
As an example below, I simply try to have the “Title” being displayed dynamically without success

But when reopening the editor (in lovelace), the row

{{ states(‘counter.presence_hall’)}}
has been replaced by
’[object Object]’: null

Any idea or alternive for my main objective (change background-color when sensor above a given numeric value) ?

    cards:
      - elements:
          - entity: sensor.zigate_00158d00034f8c03_temperature
            style:
              left: 25%
              top: 57.5%
            title: température
            type: state-label
          - entity: sensor.zigate_00158d00034f8c03_humidity
            style:
              left: 25%
              top: 59.2%
            title: {{ states('counter.presence_hall')}}
            type: state-label
        image: local/Thines3.jpg
        type: picture-elements

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95445

Trending Articles



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