#Edit new Home dashboard, get the summary cards.
1 messages · Page 1 of 1 (latest)
I don't think these are actually new cards, per se. I think they're hard-coded to essentially just provide the output. See TPC's comment below.
You can make something of your own using auto entities. In this example, I also used Mushroom card, layout-card, and card_mod. (It is really just a proof-of-concept and not 100% working like the Summaries show.)
type: custom:layout-card
layout_type: custom:grid-layout
layout_options:
width: 100
layout:
grid-template-columns: 40% 60%
grid-template-rows: auto
cards:
- type: custom:mushroom-template-card
primary: >-
{%- set count_of_lights_on = states.light
| selectattr('entity_id', 'in', area_entities('Living Room'))
| selectattr('state' , 'eq' , 'on')
| sort(attribute='name')
| map(attribute = 'entity_id')
| list | count
-%}
{%- set count_of_lights = states.light
| selectattr('entity_id', 'in', area_entities('Living Room'))
| selectattr('state' , 'in' , ['on','off'])
| sort(attribute='name')
| map(attribute = 'entity_id')
| list | count
-%}
{% if (count_of_lights_on == 0) %}No lights on
{% elif (count_of_lights == count_of_lights_on) %}All On
{% elif (count_of_lights_on != count_of_lights) %}{{count_of_lights_on}} of {{count_of_lights}} lights on
{% endif %}
icon: mdi:power
card_mod:
style: |
ha-card {
border: none;
background: none
}
- type: custom:auto-entities
card:
type: custom:layout-card
layout_type: custom:grid-layout
layout_options:
width: 100
layout:
grid-template-columns: 200px 200px 200px
grid-template-rows: auto
card_param: cards
filter:
include:
- options:
type: custom:mushroom-entity-card
entity_id: this.entity_id
layout: horizontal
secondary_info: none
tap_action:
action: toggle
hold_action:
action: more-info
domain: light
area: Living Room
exclude:
- options: {}
state: unavailable
Revision:
https://pastebin.com/FTXKCvwH (code exceeds 2000 characters)
- auto-entities and the count templates now ignore Group entities
- the mushroom-template-card now can now toggle an entity via icon_tap_action (intended for a group entity) and icon_hold_action shows its more-info
- icon now has color when on
- height of the template card set to 75px to keep it "at the top" when auto-entities adds rows