Configuration
Configuration Options
This Strategy has a sensible default configuration, which is the one i myself use!
You can start without configuring anything. If you want to change something take a look at the Configuration Documentation.
Click for Configuration Options
option | description | type | required | default | example |
---|---|---|---|---|---|
tabs | Tabs shown in the main area. More
| Array | yes | set | tabs: - label: Test icon: mdi:test rows: #Row Config here - ~Camera - ~Stats |
areaColors | Overlay Colors for navigation area. Must be in the form of a rgba css-value. rgb defines the color and the a-channel defines transparency.
| Array | yes | set | areaColors: - rgba(0,0,0,0.5) |
areaCardConfig | The config for the area card.
| Object | yes | set | areaCardConfig: aspect_ratio: 1:1 |
areaBlacklist | Which areas should be ignored (no views generated/not shown in navigation) | Array | no | - | areaBlacklist: - living_room - bathroom |
topCards | Slot for cards above navigation. More | Array | no | - | topCards: - type: entity entities: - button.test - button.test2 |
extraViews | You can pass any extra views you want on the dashboard. | Array | no | - | extraViews: - strategy: type: custom:battery-view-strategy icon: mdi:test path: test title: Test |
minColumnWidth | Minimal Column Width in the Grid = The Minimal Width of the Cards. | number | yes | set for area-dashboard-strategy set for all other strategies | minColumnWidth: 300 |
replaceCards | You can set a card to be used for a specific entity. Overwrites default card config | Object | no | - | replaceCards: button.test: type: entity entities: - $entity |
So valid YAML for this could look like this:
---
strategy:
type: custom:area-dashboard-strategy
config:
tabs:
- label: Test
icon: mdi:test
rows:
- "~Camera"
- "~Stats"
areaColors:
- rgba(0,0,0,0.5)
areaCardConfig:
aspect_ratio: 3660
areaBlacklist:
- living_room
- bathroom
topCards:
- type: entity
entities:
- button.test
- button.test2
extraViews:
- strategy:
type: custom:battery-view-strategy
icon: mdi:test
path: test
title: Test
minColumnWidth: 300
replaceCards:
button.test:
type: entity
entities:
- "$entity"
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!
Tabs
The tabs shown in the the main section.
Define as many Tabs as you want. The Tab will only be shown in the View per Area when it has content.
Example: if the Living Room has a Tab where none of the rows would have entities (like Camera, which has only one row and can easily be empty) the whole Tab is hidden.
Click for Configuration Options
option | description | type | required | example |
---|---|---|---|---|
title | Title shown in the Tab | string | yes | title: Test |
icon | Icon shown in the Tab | string | yes | icon: mdi:test |
rows | The grid rows definition of the tab. More
| Array | yes | rows: - title: test card: type: tile filter: include: - type: domain value: media_player - title: test2 card: type: tile filter: include: - type: domain value: sensor |
So valid YAML for this could look like this:
---
title: Test
icon: mdi:test
rows:
- title: test
card:
type: tile
filter:
include:
- type: domain
value: media_player
- title: test2
card:
type: tile
filter:
include:
- type: domain
value: sensor
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
option | description | type | required | example |
---|---|---|---|---|
title | Title shown over Grid. Will not be rendered when not set. | string | no | title: Buttons |
filter | Define include and exclude function for more fine-grained control of entities selected for row than only domain.
| 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 | |
card | The 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!
| Object | yes | card: type: tile entity: $entity iconColor: red |
domain | Domain or Array of domains the entity must belong to.
| no | domain: - button - media_player |
So valid YAML for this could look like this:
---
domain:
- button
- media_player
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
option | description | type | required | example |
---|---|---|---|---|
type | The type of filter to determine the value or just specify the filter | Object | yes | type: state |
comparator | The 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) | Object | no | comparator: equal |
value | The user specified value | unknown | no | 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
option | description | example |
---|---|---|
entity | Filter on the entity_id of the entity.
| - type: entity comparator: equal value: sensor.test123 |
domain | Filter on the domain of the entity. | - type: domain comparator: equal value: sensor |
device | Filter on the parent device_id of the entity.
| - type: device comparator: equal value: 98b750a482bbf28ea959269981813219 |
area | Filter on the area_id of the entity.
| - type: area comparator: equal value: living_room |
integration | Filter on the integration of the entity.
| - type: integration comparator: equal value: mqtt |
label | Filter on the label of the entity.
| - type: label comparator: equal value: sort_1 |
state | Filter on the state of the entity. | - type: state comparator: equal value: on |
attribute | Filter on an attribute of the entity.
| - type: attribute comparator: equal value: key: volume value: 100 |
disabled_by | Filter on the disabled_by state of the entity.
| - type: disabled_by comparator: match value: .* |
hidden_by | Filter on the hidden_by state of the entity.
| - type: hidden_by comparator: match value: .* |
entity_category | Filter 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
option | description | example |
---|---|---|
equal | Check if the selected type value of the entity and the passed value are equal. | - type: state comparator: equal value: on |
match | Check if the selected type value of the entity matches against the passed regexp value.
| - type: entity comparator: match value: .*_occupancy |
in | Check if the selected type value of the entity is in the list of defined values.
| - type: state comparator: in value: - on - off |
greater_than | Check if the selected type value of the entity is greater than the defined value.
| - type: state comparator: greater_than value: 5 |
lower_than | Check if the selected type value of the entity is lower than the defined value.
| - type: state comparator: lower_than value: 5 |
is_null | Check if the selected type value of the entity is null.
| - type: state comparator: is_null |
is_numeric | Check if the selected type value of the entity is numeric.
| - type: attribute comparator: is_numeric value: key: volume |
Default Config explained
The default config is written as yaml. This should make it easy to make your own changes because it is written exactly as you would in your dashboard.
You can find it here.
The Area Cards shows only device_type: occupancy as an alarm icon and temperature as info.
There are 3 Tabs.
- Control is for entities that can be interacted with (think media_players, buttons, selects, etc.).
There are Rows for:
- alarm_control_panel
- media_player
- light
- fan
- humidifier
- cover
- vacuum
- switch and input_boolean
- select and input_select
- button and scene
- number
- Stats is for “read-only” entities like binary_sensors and sensors.
There are Rows for:
- binary_sensor
- sensor (non-numeric ones)
- sensor (numeric ones)
- Camera is for Camera-Streams.
There are Rows for:
- camera