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

Change image based on state of sensor

$
0
0

@Marco_Simon wrote:

I’m trying to make a picture card with my picture, when @home i want it to be in colour and when away i’d like it to be grayed out.

I’m using the last example of https://www.home-assistant.io/lovelace/picture-glance/
but i only get a error.


aspect_ratio: 0%
entities:

  • device_tracker.marco_tado_s9
    entity: person.marco_simon
    hold_action:
    action: none
    image: local/marco_kleur.jpg
    state_image:
    afwezig: /local/marco_zwart.jpg
    thuis: /local/marco_kleur.jpg
    tap_action:
    action: none
    title: Marco
    type: picture-glance

the received error is:
Expected a value of type undefined for state_image but received {"afwezig":"/local/marco_zwart.jpg","thuis":"/local/marco_kleur.jpg"}.

i get the same error when i just copy past the example from the page :frowning:

i also tried the grayscale option


type: picture-glance
title: steven
entities: []
image: /local/steven_kleur.jpg
state_filter:
thuis: grayscale(0%);
afwezig: grayscale(100%);
home: grayscale(0%);
away: grayscale(100%);
entity: device_tracker.steven

who’s got the solution for me ??

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95387

Trending Articles



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