mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 14:56:53 +00:00
Update logbook and history for entity glob matching (#14589)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
8e00021912
commit
e497c77377
@ -44,6 +44,10 @@ exclude:
|
|||||||
description: The list of entity ids to be excluded from the history.
|
description: The list of entity ids to be excluded from the history.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
entity_globs:
|
||||||
|
description: Include all entities matching a listed pattern when creating logbook entries (e.g., `sensor.weather_*`).
|
||||||
|
required: false
|
||||||
|
type: list
|
||||||
domains:
|
domains:
|
||||||
description: The list of domains to be excluded from the history.
|
description: The list of domains to be excluded from the history.
|
||||||
required: false
|
required: false
|
||||||
@ -57,6 +61,10 @@ include:
|
|||||||
description: The list of entity ids to be included in the history.
|
description: The list of entity ids to be included in the history.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
entity_globs:
|
||||||
|
description: Include all entities matching a listed pattern when creating logbook entries (e.g., `sensor.weather_*`).
|
||||||
|
required: false
|
||||||
|
type: list
|
||||||
domains:
|
domains:
|
||||||
description: The list of domains to be included in the history.
|
description: The list of domains to be included in the history.
|
||||||
required: false
|
required: false
|
||||||
@ -83,6 +91,8 @@ history:
|
|||||||
entities:
|
entities:
|
||||||
- sensor.last_boot
|
- sensor.last_boot
|
||||||
- sensor.date
|
- sensor.date
|
||||||
|
entity_globs:
|
||||||
|
- binary_sensor.*_occupancy
|
||||||
```
|
```
|
||||||
|
|
||||||
Define domains and entities to display by using the `include` configuration
|
Define domains and entities to display by using the `include` configuration
|
||||||
@ -136,6 +146,18 @@ history:
|
|||||||
- light.front_porch
|
- light.front_porch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Filters are applied as follows:
|
||||||
|
|
||||||
|
1. No includes or excludes - pass all entities
|
||||||
|
2. Includes, no excludes - only include specified entities
|
||||||
|
3. Excludes, no includes - only exclude specified entities
|
||||||
|
4. Both includes and excludes - include specified entities and exclude specified entities from the remaining.
|
||||||
|
|
||||||
|
The following characters can be used in entity globs:
|
||||||
|
|
||||||
|
`*` - The asterisk represents zero, one, or multiple characters
|
||||||
|
`.` - The period represents a single character
|
||||||
|
|
||||||
#### Implementation details
|
#### Implementation details
|
||||||
|
|
||||||
The history is stored in a SQLite database `home-assistant_v2.db` within your
|
The history is stored in a SQLite database `home-assistant_v2.db` within your
|
||||||
|
@ -88,18 +88,12 @@ Filters are applied as follows:
|
|||||||
1. No includes or excludes - pass all entities
|
1. No includes or excludes - pass all entities
|
||||||
2. Includes, no excludes - only include specified entities
|
2. Includes, no excludes - only include specified entities
|
||||||
3. Excludes, no includes - only exclude specified entities
|
3. Excludes, no includes - only exclude specified entities
|
||||||
4. Both includes and excludes:
|
4. Both includes and excludes - include specified entities and exclude specified entities from the remaining.
|
||||||
- Include domain and/or glob patterns specified
|
|
||||||
- If domain is included, and entity not excluded or match exclude glob pattern, pass
|
The following characters can be used in entity globs:
|
||||||
- If entity matches include glob pattern, and entity does not match any exclude criteria (domain, glob pattern or listed), pass
|
|
||||||
- If domain is not included, glob pattern does not match, and entity not included, fail
|
- `*` - The asterisk represents zero, one, or multiple characters
|
||||||
- Exclude domain and/or glob patterns specified and include does not list domains or glob patterns
|
- `.` - The period represents a single character
|
||||||
- If domain is excluded and entity not included, fail
|
|
||||||
- If entity matches exclude glob pattern and entity not included, fail
|
|
||||||
- If entity does not match any exclude criteria (domain, glob pattern or listed), pass
|
|
||||||
- Neither include or exclude specifies domains or glob patterns
|
|
||||||
- If entity is included, pass (as #2 above)
|
|
||||||
- If entity include and exclude, the entity exclude is ignored
|
|
||||||
|
|
||||||
### Common filtering examples
|
### Common filtering examples
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user