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
option | description | type | required | default | example |
---|---|---|---|---|---|
presets | The presets for which there will be buttons which load the history of the specified (filtered) entities. | Array | yes | - | presets: - icon: mdi:motion-sensor title: Occupancy filter: include: - type: entity comparator: match value: binary_sensor\..*_occupancy - icon: mdi:light-bulb title: Lights (but not Living Room) filter: include: - type: domain value: exclude: - type: area value: living_room |
So valid YAML for this could look like this:
---
strategy:
type: custom:log-view-strategy
config:
presets:
- icon: mdi:motion-sensor
title: Occupancy
filter:
include:
- type: entity
comparator: match
value: binary_sensor\..*_occupancy
- icon: mdi:light-bulb
title: Lights (but not Living Room)
filter:
include:
- type: domain
value:
exclude:
- type: area
value: living_room
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!
Log Preset
Defines the Button on the side and which entities will be loaded in the Log Card when the Preset Button is clicked.
Define as many Log Presets as you want.
Click for Configuration Options
option | description | type | required | example |
---|---|---|---|---|
presets | The presets for which there will be buttons which load the history of the specified (filtered) entities. | Array | yes | presets: - icon: mdi:motion-sensor title: Occupancy filter: include: - type: entity comparator: match value: binary_sensor\..*_occupancy - icon: mdi:light-bulb title: Lights (but not Living Room) filter: include: - type: domain value: exclude: - type: area value: living_room |
So valid YAML for this could look like this:
---
presets:
- icon: mdi:motion-sensor
title: Occupancy
filter:
include:
- type: entity
comparator: match
value: binary_sensor\..*_occupancy
- icon: mdi:light-bulb
title: Lights (but not Living Room)
filter:
include:
- type: domain
value:
exclude:
- type: area
value: living_room
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 |