# Note: This dashboard needs the following from HACS
# * lovelace-layout-card (view type custom:grid-layout, and options)
# * lovelace-auto-entities (card type custom:auto-entities)
# * lovelace-canary (canary_style)
# In theory, none of this would need to be modified for your notifications to show up
# Obviously, the weather cards (two of them) and the menu buttons won't work for you.
# Views 1 & 2 are the dashboards I had as screenshots.
# Views 3 & 4 are scratch areas where I was trying different options
views:
  # View 1: Vertical
  - theme: Backend-selected
    title: Home Vertical
    type: custom:grid-layout
    layout:
      gridrows: auto
      grid-template-columns: 33% 22% 22% 22%
      grid-template-areas: |
        "l1 11 12 13"
        "l1 21 22 23"
        "l1 31 32 33"
    badges: []
    cards:
      - type: vertical-stack
        cards:
          - show_current: true
            show_forecast: false
            type: weather-forecast
            entity: weather.forecast_home
            name: Forecast
          - type: custom:auto-entities
            card:
              type: vertical-stack
            card_param: cards
            else:
              type: weather-forecast
              show_current: false
              show_forecast: true
              entity: weather.forecast_home
              name: Forecast
            filter:
              include:
                - entity_id: persistent_notification.*
                  options:
                    type: entity
                    attribute: message
                    canary_style:
                      border-color: grey
                      background-image: linear-gradient(rgba(240,128,128,0.8), rgba(128,0,0,1));
            sort:
              method: last_triggered
        view_layout:
          grid-area: l1
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /dashboard-house
        icon: mdi:home
        name: House
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /room-front-room
        name: Front Room
        icon: mdi:sofa
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /room-upstairs
        name: Office & Upstairs
        icon: mdi:desk
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /room-basement
        name: Downstairs
        icon: mdi:stairs-down
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /room-bedrooms
        name: Bedrooms
        icon: mdi:bed-empty
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /dashboard-cameras
        name: Security Cameras
        icon: mdi:cctv
  # View 2: Horizontal
  - theme: Backend-selected
    title: Home Horizontal
    type: custom:grid-layout
    layout:
      gridrows: auto
      grid-template-columns: 33% 33% 33%
      grid-template-areas: |
        "h1 h1 h1"
        "11 12 13"
        "21 22 23"
    badges: []
    cards:
      - type: horizontal-stack
        view_layout:
          grid-area: h1
        cards:
          - type: custom:auto-entities
            card:
              type: horizontal-stack
              view_layout:
                grid-area: h1
            card_param: cards
            show_empty: false
            filter:
              include:
                - entity_id: persistent_notification.*
                  options:
                    type: entity
                    attribute: message
                    canary_style:
                      border-color: grey
                      background-image: linear-gradient(rgba(240,128,128,0.8), rgba(128,0,0,1));
            sort:
              method: last_triggered
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /dashboard-house
        icon: mdi:home
        name: House
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /room-front-room
        name: Front Room
        icon: mdi:sofa
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /room-upstairs
        name: Office & Upstairs
        icon: mdi:desk
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /room-basement
        name: Downstairs
        icon: mdi:stairs-down
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /room-bedrooms
        name: Bedrooms
        icon: mdi:bed-empty
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /dashboard-cameras
        name: Security Cameras
        icon: mdi:cctv
  # View 3: Scratch space experimenting with Non-HACS options
  - theme: Backend-selected
    title: No HACS
    badges: []
    cards:
      - type: entities
        title: Manual Entities
        entities:
          - persistent_notification.abc
          - persistent_notification.xyz
          - persistent_notification.zzz
      - type: entity-filter
        entities:
          - persistent_notification.abc
          - persistent_notification.xyz
          - persistent_notification.zzz
        state_filter:
          - notifying
        card:
          type: entities
          title: Manual Filter Entities
      - type: entity-filter
        entities:
          - entity: persistent_notification.abc
            secondary_info: last-changed
            type: attribute
            attribute: message
          - entity: persistent_notification.xyz
            secondary_info: last-changed
            type: attribute
            attribute: message
          - entity: persistent_notification.zzz
            secondary_info: last-changed
            type: attribute
            attribute: message
        state_filter:
          - operator: regex
            value: .
        card:
          type: entities
          title: Manual Filter Entities w/ Secondary
  # View 3: Scratch space experimenting with auto-entities from HACS
  - theme: Backend-selected
    title: Auto-Entities
    badges: []
    cards:
      - type: vertical-stack
        cards:
          - type: custom:auto-entities
            card:
              type: entities
              title: Notifications
            filter:
              include:
                - entity_id: persistent_notification.*
          - type: custom:auto-entities
            card:
              type: entities
              title: Notifications using Attribute & Date
            filter:
              include:
                - entity_id: persistent_notification.*
                  options:
                    type: attribute
                    attribute: message
                    secondary_info: last-changed
          - type: custom:auto-entities
            card:
              type: entities
              title: Notifications w/ Secondary Info
            filter:
              include:
                - entity_id: persistent_notification.*
                  options:
                    secondary_info:
                      attribute: message
          - type: custom:auto-entities
            card:
              type: glance
              title: Notifications in Glance
              show_state: false
            show_empty: false
            filter:
              include:
                - entity_id: persistent_notification.*
            sort:
              method: last_triggered
      - type: custom:auto-entities
        card:
          type: vertical-stack
          title: Notifications in Vertical Stack of Cards
        card_param: cards
        filter:
          include:
            - entity_id: persistent_notification.*
              options:
                type: entity
                attribute: message
        sort:
          method: last_triggered

