Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
3.2 kB
2
Indexable
Never
type: custom:mushroom-chips-card
chips:
  - type: template
    icon: |+
      {% if is_state("group.pir_senzory_grp", "on") %}
      mdi:motion-sensor
      {% else %}
      mdi:motion-sensor-off
      {% endif %}

    entity: group.pir_senzory_grp
    content: >-
      {{ expand(states.group.pir_senzory_grp) | selectattr('state', 'eq', 'on')
      | map(attribute='entity_id') | list | count  }}
    icon_color: |-
      {% if is_state("group.pir_senzory_grp", "on") %}
      orange
      {% else %}
      {% endif %}
    tap_action:
      action: more-info
  - type: template
    icon: |-
      {% if is_state("group.dvere_grp", "on") %}
      mdi:door-open
      {% else %}
      mdi:door-closed
      {% endif %}
    entity: group.dvere_grp
    content: >-
      {{ expand(states.group.dvere_grp) | selectattr('state', 'eq', 'on') |
      map(attribute='entity_id') | list | count  }}
    icon_color: |-
      {% if is_state("group.dvere_grp", "on") %}
      red
      {% else %}
      {% endif %}
    tap_action:
      action: more-info
  - type: template
    icon: |
      {% if is_state("group.okna_grp", "on") %}
      mdi:window-open-variant
      {% else %}
      mdi:window-closed-variant
      {% endif %}
    entity: group.okna_grp
    content: >-
      {{ expand(states.group.okna_grp) | selectattr('state', 'eq', 'on') |
      map(attribute='entity_id') | list | count  }}
    icon_color: |-
      {% if is_state("group.okna_grp", "on") %}
      blue
      {% else %}
      {% endif %}
    tap_action:
      action: more-info
  - type: template
    icon: mdi:lightbulb-multiple
    entity: group.vypynace_vrch_grp
    content: >-
      {{ expand(states.group.vypynace_vrch_grp) | selectattr('state', 'eq',
      'on') | map(attribute='entity_id') | list | count  }}
    icon_color: |-
      {% if is_state("group.vypynace_vrch_grp", "on") %}
      orange
      {% else %}
      {% endif %}
    tap_action:
      action: more-info
  - type: template
    icon: mdi:wall-sconce-round
    entity: group.vypinace_prizemie_grp
    content: >-
      {{ expand(states.group.vypinace_prizemie_grp) | selectattr('state', 'eq',
      'on') | map(attribute='entity_id') | list | count  }}
    icon_color: |-
      {% if is_state("group.vypinace_prizemie_grp", "on") %}
      orange
      {% else %}
      {% endif %}
    tap_action:
      action: more-info
  - type: template
    icon: mdi:track-light
    entity: group.vypinace_dvor_grp
    content: >-
      {{ expand(states.group.vypinace_dvor_grp) | selectattr('state', 'eq',
      'on') | map(attribute='entity_id') | list | count  }}
    icon_color: |-
      {% if is_state("group.vypinace_dvor_grp", "on") %}
      orange
      {% else %}
      {% endif %}
    tap_action:
      action: more-info
  - type: template
    icon: |-
      {% if is_state("group.brany_grp", "on") %}
      mdi:boom-gate-up
      {% else %}
      mdi:boom-gate
      {% endif %}
    entity: group.brany_grp
    content: >-
      {{ expand(states.group.brany_grp) | selectattr('state', 'eq', 'on') |
      map(attribute='entity_id') | list | count  }}
    icon_color: |-
      {% if is_state("group.brany_grp", "on") %}
      orange
      {% else %}
      {% endif %}
    tap_action:
      action: more-info