Configuration
This Strategy needs you to configure it for it to work!
Take a look at the Configuration Documentation for the required options!
Strategy Options
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:
Click for full example
---
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: TestReferences
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:
Click for full example
---
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_roomFilter
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 | default | example |
|---|---|---|---|---|---|
| type | The type of filter to determine the value from the entity/area. | Reference | yes | - |
type: state |
| config | Extra configuration options for the filter type.
| Reference | no | - |
config: key: device_class |
| comparator | Compare method for value 1 (extracted from entity/area) and value 2 (specified by user) | Reference | no | equal |
comparator: equal |
| value | The user specified value
| unknown | no | - |
value: on |
So valid YAML for this could look like this:
Click for full example
---
type: state
config:
key: device_class
comparator: equal
value: trueFilter 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
|