Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions source/_integrations/history.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ exclude:
description: The list of entity ids to be excluded from the history.
required: false
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:
description: The list of domains to be excluded from the history.
required: false
Expand All @@ -57,6 +61,10 @@ include:
description: The list of entity ids to be included in the history.
required: false
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:
description: The list of domains to be included in the history.
required: false
Expand All @@ -83,6 +91,8 @@ history:
entities:
- sensor.last_boot
- sensor.date
entity_globs:
- binary_sensor.*_occupancy
```

Define domains and entities to display by using the `include` configuration
Expand Down Expand Up @@ -136,6 +146,18 @@ history:
- 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

The history is stored in a SQLite database `home-assistant_v2.db` within your
Expand Down
18 changes: 6 additions & 12 deletions source/_integrations/logbook.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,12 @@ 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 domain and/or glob patterns specified
- If domain is included, and entity not excluded or match exclude glob pattern, pass
- 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
- Exclude domain and/or glob patterns specified and include does not list domains or glob patterns
- 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
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

### Common filtering examples

Expand Down