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

Picture Elements Card conditional

$
0
0

@zxman wrote:

I am trying to set up a picture elements card with conditional formatting.
What I am trying to do is set the color of each element based on the numerical state of the entity
my sensors are on

sensor.server_temp_n:m

where n:m is a number 0:29
they correspond to sensors on my home server.
I want to be able to show the heatmap of the server based on their values.

elements:
  - type: conditional
    conditions:
      - entity: sensor.server_temp_0
        value_template: '{{state.state > 20.00 }}'
        
    elements:
      - type: state-badge
        entity: sensor.server_temp_0
        style:
          top: 40%
          left: 40%
image: 'https://demo.home-assistant.io/stub_config/floorplan.png'
type: picture-elements

This is what I have so far, but obviously it is wrong.

Any help greatly appreciated

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 105972

Trending Articles



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