diff --git a/source/_integrations/history.markdown b/source/_integrations/history.markdown index 49a7f935ac4..e2816cb88c8 100644 --- a/source/_integrations/history.markdown +++ b/source/_integrations/history.markdown @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/source/_integrations/logbook.markdown b/source/_integrations/logbook.markdown index 31164d17c6f..bba544c7cba 100644 --- a/source/_integrations/logbook.markdown +++ b/source/_integrations/logbook.markdown @@ -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