Newer
Older
homeassistant_config / dashboards / minimal / declutter.yaml
title_template: # This is the name of a template
  default:
    - font-size: "2rem"
    - alignment: "center"
  card:
    type: custom:mod-card
    card:
      type: custom:mushroom-title-card
      title: "[[title]]"
      alignment: "[[alignment]]"
    card_mod:
      style:
        "mushroom-title-card":
          "$": |
            h1 {
              font-size: [[font-size]] !important;
            }

subpanel_title_template:
  default:
    - font-size: "2rem"
    - alignment: "center"
  card:
    type: "custom:layout-card"
    layout_type: custom:grid-layout
    layout:
      grid-template-columns: 50px auto
      place-items: baseline stretch
    cards:
      - type: custom:mushroom-chips-card
        chips:
          - type: back

      - type: custom:decluttering-card
        template: title_template
        variables:
          - title: "[[title]]"
          - alignment: "[[alignment]]"

light_group_list_template:
  default:
    rename_from: " Gruppe"
    rename_to: Test
  card:
    type: custom:auto-entities
    show_empty: false
    card:
      type: custom:layout-card
      layout_type: custom:grid
      layout:
        grid-template-columns: 1fr 1fr
    card_param: cards
    filter:
      template: |-
        [
        {% for light in states.light.[[group_name]].attributes.entity_id %}
        {% set entity = states[light] %}
        {% if entity != None and entity.state != "unavailable" %}
        {{
          {
            "type": "custom:mushroom-light-card",
            "entity": entity.entity_id,
            "name": (entity.attributes.friendly_name | replace(" Gruppe", ""))
          }
        }},
        {% endif %}
        {% endfor %}       
        ]