Configuration

Configuration Options

This Strategy needs you to configure it for it to work!

Take a look at the Configuration Documentation for the required options!

Click for Configuration Options
optiondescriptiontyperequireddefaultexample
rowsThe rows shown in the View. More Arrayyes-
rows:
  - title: test
    card:
      type: tile
    filter: 
      include:
         - type: domain
           value: media_player
  - title: test2
    card:
      type: tile
    filter: 
      include:
         - type: domain
           value: sensor
minColumnWidthMinimal Column Width in the Grid = The Minimal Width of the Cards. numberyes set for area-dashboard-strategy
set for all other strategies
minColumnWidth: 300
replaceCardsYou can set a card to be used for a specific entity. Overwrites default card config Objectno-
replaceCards:
  button.test:
    type: entity
    entities:
      - $entity

So valid YAML for this could look like this:

---
strategy:
  type: custom:grid-view-strategy
  config:
    rows:
    - title: test
      card:
        type: tile
      filter:
        include:
        - type: domain
          value: media_player
    - title: test2
      card:
        type: tile
      filter:
        include:
        - type: domain
          value: sensor
    minColumnWidth: 300
    replaceCards:
      button.test:
        type: entity
        entities:
        - "$entity"
icon: mdi:test
path: test
title: Test

I used all available options in this example. You don`t need to do this! Take a look at the required fields for what you need!

Content/Rows

Every Row consists of a (optional) title and a Grid with all the cards for the entities. The row is defined by:

Click for Configuration Options
optiondescriptiontyperequiredexample
titleTitle shown over Grid. Will not be rendered when not set. stringno
title: Buttons
filterDefine include and exclude function for more fine-grained control of entities selected for row than only domain.

A entity needs to match all include filters to be included but it needs only to match one of the exclude filters to be excluded!

no
filter:
  include:
    - type: domain
      value: binary_sensor
    - type: state
      value: on
  exclude:
    - type: entity
      value: sensor.test123
    - type: state
      comparator: is_null
    - type: area
      value: living_room
cardThe cardConfig of the card that should be rendered for every entity in the grid. You can use all cards you would normally use in your dashboard!

You can insert the entityId of the entity with the $entity variable which will be replaced in the whole object by the entities entity_id.

Objectyes
card:
  type: tile
  entity: $entity
  iconColor: red

So valid YAML for this could look like this:

---
title: Buttons
filter:
  include:
  - type: domain
    value: binary_sensor
  - type: state
    value: true
  exclude:
  - type: entity
    value: sensor.test123
  - type: state
    comparator: is_null
  - type: area
    value: living_room
card:
  type: tile
  entity: "$entity"
  iconColor: red

I used all available options in this example. You don`t need to do this! Take a look at the required fields for what you need!

Filter

Filters can be defined for fine-grained control which entities should be matched. You can use both include and exclude as keys. Both are optional.

filter:
  include:
    - ...
  exclude:
    - ...

Both accept the same types and syntax.

An entity needs to match all include filters to be included but it needs only to match one of the exclude filters to be excluded!

The filter object looks like this.

Click for Configuration Options
optiondescriptiontyperequiredexample
typeThe type of filter to determine the value or just specify the filter Objectyes
type: state
comparatorThe comparator to use to compare the left value (the value in the entity described by the type) and the right value (the user specified value) Objectno
comparator: equal
valueThe user specified value unknownno
value: on

So valid YAML for this could look like this:

---
type: state
comparator: equal
value: true

I used all available options in this example. You don`t need to do this! Take a look at the required fields for what you need!

Filter Type

These are the options for filter type.

Click for Configuration Options
optiondescriptionexample
entityFilter on the entity_id of the entity.

entity_id not Entity Name or Display Name! Some ways to find it explained here

- type: entity
  comparator: equal
  value: sensor.test123
domainFilter on the domain of the entity.
- type: domain
  comparator: equal
  value: sensor
deviceFilter on the parent device_id of the entity.

device_id not Device Name or Display Name! Some ways to find it explained here

- type: device
  comparator: equal
  value: 98b750a482bbf28ea959269981813219
areaFilter on the area_id of the entity.

area_id not Area Name or Display Name! Find at "https://YourHA/config/areas/dashboard". Edit Area = shows area_id

- type: area
  comparator: equal
  value: living_room
integrationFilter on the integration of the entity.

Needs to be the id of the integration not the name! More on how to find it here

- type: integration
  comparator: equal
  value: mqtt
labelFilter on the label of the entity.

Needs to be the id of the label not the name! More on how to find it here

- type: label
  comparator: equal
  value: sort_1
stateFilter on the state of the entity.
- type: state
  comparator: equal
  value: on
attributeFilter on an attribute of the entity.

Needs a special value structure with another object with key + value, where key is the desired attribute

- type: attribute
  comparator: equal
  value:
    key: volume
    value: 100
disabled_byFilter on the disabled_by state of the entity.

Possible Disablers here

- type: disabled_by
  comparator: match
  value: .*
hidden_byFilter on the hidden_by state of the entity.

Possible Hiders here

- type: hidden_by
  comparator: match
  value: .*
entity_categoryFilter on the category of the entity.
- type: entity_category
  comparator: equal
  value: diagnostic

Filter Comparator

These are the options for filter comparator.

Click for Configuration Options
optiondescriptionexample
equalCheck if the selected type value of the entity and the passed value are equal.
- type: state
  comparator: equal
  value: on
matchCheck if the selected type value of the entity matches against the passed regexp value.

Regexp can be tested here

- type: entity
  comparator: match
  value: .*_occupancy
inCheck if the selected type value of the entity is in the list of defined values.

value needs to be an array!

- type: state
  comparator: in
  value:
    - on
    - off
greater_thanCheck if the selected type value of the entity is greater than the defined value.

Works only on numeric type values and defined values!

- type: state
  comparator: greater_than
  value: 5
lower_thanCheck if the selected type value of the entity is lower than the defined value.

Works only on numeric type values and defined values!

- type: state
  comparator: lower_than
  value: 5
is_nullCheck if the selected type value of the entity is null.

Does not need a value defined! Exception is type: attribute as it needs key for attribute name!

- type: state
  comparator: is_null
is_numericCheck if the selected type value of the entity is numeric.

Does not need a value defined! Exception is type: attribute as it needs key for attribute name!

- type: attribute
  comparator: is_numeric
  value:
    key: volume