Hi, only new to the picture-elements card I’m trying to have an image set according to the state of my device_tracker.life360. This device_tracker follows many zones, but for this card Im only interested in home, not_home, and ‘else’.
Can we somehow set a ‘default’ for the else in the config?
type: picture-elements
image: /local/various/presence_frame.png
elements:
- type: image
entity: device_tracker.life360_marijn
style:
top: 35%
left: 50%
width: 100%
state_image:
"home": /local/family/marijn_bmj.png
"not_home": /local/family/marijn_not_home.png
Or, can I use another sensor for the state?
I have a sensor in my system that has as its state a picture for all states the device_tracker can be in.
Would be really nice if I could simply use that, but we might not be able to use that here? No support for a template like {{states{'sensor.marijn_location_picture')}}
…?
or what I use in my button-card templates:
entity_picture: >
[[[
var id = entity.entity_id.split('_')[2];
return states['sensor.' + id + '_picture'].state;
]]]
Could I maybe use that in a card-mod setting via style: { }
?
thanks for having a look