Created
September 7, 2023 07:57
-
-
Save jlpouffier/1f5f3f5f55727a4641f7bcda2a98a2db to your computer and use it in GitHub Desktop.
Supercharged Mushroom Person card
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type: horizontal-stack | |
cards: | |
- type: custom:mushroom-template-card | |
primary: JL | |
secondary: |- | |
{% if is_state("person.person_1", "home") -%} | |
Présent | |
{%- elif is_state("person.person_1", "not_home") -%} | |
{{ state_attr("sensor.person_1_android_geocoded_location", "locality") }}{% if not is_state_attr("sensor.person_1_android_geocoded_location", "iso_country_code", "FR") %} - {{ state_attr("sensor.person_1_android_geocoded_location", "country") }}{%- endif %} | |
{%- else -%} | |
{{states("person.person_1")}} | |
{%- endif %} | |
icon: '' | |
entity: person.person_1 | |
picture: '{{ state_attr("person.person_1", "entity_picture" ) }}' | |
icon_color: '' | |
badge_icon: |- | |
{% if is_state("person.person_1", "home") -%} | |
mdi:home | |
{%- elif is_state("person.person_1", "not_home") -%} | |
mdi:earth | |
{%- else -%} | |
mdi:map-marker | |
{%- endif %} | |
badge_color: |- | |
{% if is_state("person.person_1", "home") -%} | |
green | |
{%- elif is_state("person.person_1", "not_home") -%} | |
red | |
{%- else -%} | |
blue | |
{%- endif %} | |
tap_action: | |
action: more-info | |
hold_action: | |
action: none | |
double_tap_action: | |
action: none | |
fill_container: false | |
- type: custom:mushroom-template-card | |
primary: Valentine | |
secondary: |- | |
{% if is_state("person.person_2", "home") -%} | |
Présente | |
{%- elif is_state("person.person_2", "not_home") -%} | |
{{ state_attr("sensor.person_2_android_geocoded_location", "locality") }}{% if not is_state_attr("sensor.person_2_android_geocoded_location", "iso_country_code", "FR") %} - {{ state_attr("sensor.person_2_android_geocoded_location", "country") }}{%- endif %} | |
{%- else -%} | |
{{states("person.person_2")}} | |
{%- endif %} | |
icon: '' | |
entity: person.person_2 | |
picture: '{{ state_attr("person.person_2", "entity_picture" ) }}' | |
icon_color: '' | |
badge_icon: |- | |
{% if is_state("person.person_2", "home") -%} | |
mdi:home | |
{%- elif is_state("person.person_2", "not_home") -%} | |
mdi:earth | |
{%- else -%} | |
mdi:map-marker | |
{%- endif %} | |
badge_color: |- | |
{% if is_state("person.person_2", "home") -%} | |
green | |
{%- elif is_state("person.person_2", "not_home") -%} | |
red | |
{%- else -%} | |
blue | |
{%- endif %} | |
tap_action: | |
action: more-info | |
hold_action: | |
action: none | |
double_tap_action: | |
action: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type: horizontal-stack | |
cards: | |
- type: custom:mushroom-template-card | |
primary: JL | |
secondary: |- | |
{% if is_state("person.person_1", "home") -%} | |
Présent | |
{%- elif is_state("person.person_1", "not_home") -%} | |
{{ state_attr("sensor.person_1_iphone_geocoded_location", "Locality") }}{% if not is_state_attr("sensor.person_1_iphone_geocoded_location", "ISO Country Code", "FR") %} - {{ state_attr("sensor.person_1_iphone_geocoded_location", "Country") }}{%- endif %} | |
{%- else -%} | |
{{states("person.person_1")}} | |
{%- endif %} | |
icon: '' | |
entity: person.person_1 | |
picture: '{{ state_attr("person.person_1", "entity_picture" ) }}' | |
icon_color: '' | |
badge_icon: |- | |
{% if is_state("person.person_1", "home") -%} | |
mdi:home | |
{%- elif is_state("person.person_1", "not_home") -%} | |
mdi:earth | |
{%- else -%} | |
mdi:map-marker | |
{%- endif %} | |
badge_color: |- | |
{% if is_state("person.person_1", "home") -%} | |
green | |
{%- elif is_state("person.person_1", "not_home") -%} | |
red | |
{%- else -%} | |
blue | |
{%- endif %} | |
tap_action: | |
action: more-info | |
hold_action: | |
action: none | |
double_tap_action: | |
action: none | |
fill_container: false | |
- type: custom:mushroom-template-card | |
primary: Valentine | |
secondary: |- | |
{% if is_state("person.person_2", "home") -%} | |
Présente | |
{%- elif is_state("person.person_2", "not_home") -%} | |
{{ state_attr("sensor.person_2_iphone_geocoded_location", "Locality") }}{% if not is_state_attr("sensor.person_2_iphone_geocoded_location", "ISO Country Code", "FR") %} - {{ state_attr("sensor.person_2_iphone_geocoded_location", "Country") }}{%- endif %} | |
{%- else -%} | |
{{states("person.person_2")}} | |
{%- endif %} | |
icon: '' | |
entity: person.person_2 | |
picture: '{{ state_attr("person.person_2", "entity_picture" ) }}' | |
icon_color: '' | |
badge_icon: |- | |
{% if is_state("person.person_2", "home") -%} | |
mdi:home | |
{%- elif is_state("person.person_2", "not_home") -%} | |
mdi:earth | |
{%- else -%} | |
mdi:map-marker | |
{%- endif %} | |
badge_color: |- | |
{% if is_state("person.person_2", "home") -%} | |
green | |
{%- elif is_state("person.person_2", "not_home") -%} | |
red | |
{%- else -%} | |
blue | |
{%- endif %} | |
tap_action: | |
action: more-info | |
hold_action: | |
action: none | |
double_tap_action: | |
action: none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment