yes, as a matter of fact i’ ve just expanded on it some more today…
this is what I use now:
in a tiles setup:
- entity: device_tracker.life360_name
style_template: >
if (state === 'not_home' && attributes.country_code !== 'nl') return 'background-color: lightgrey;background-image: url(\"/local/tiles/family/name_' + attributes.country_code + '.png\")';
if (state === 'home' || state === 'not_home') return 'background-image: url(\"/local/tiles/family/name_' + state + '.png\")';
return 'background-color: #643aac;background-image: url(\"/local/tiles/family/name_' + entities['sensor.name_location_picture'].state + '.png\")';
and in a button setup:
entity_picture_template: >
if (entity.state == 'not_home' && entity.attributes.country_code != 'nl') return '/local/tiles/family/name_' + entity.attributes.country_code + '.png';
return '/local/tiles/family/name_' + entity.state.toLowerCase().replace(/ /g, '_') + '.png';
probably can get the 3d line in the Tiles card out of it, havent looked at that in a long time. Then again, its mostly there for the colorization style, which in the Button card is done in a dedicated template, so thats why that is shorter