Add free-text filtering to the Activity view #4635
Replies: 1 comment
|
I second this request, though I'd prefer it more like an advanced search type of look up. ie. search for a keyword, but be able to tick a box/boxes to limit the filter to certain types, such as id, name, state and attribute. A use case for me is that all I keep everything organised by beginning entity id's with a word that similar entities are related to. Eg, if it's about lighting all automations/sensors/inputs/entities begin with the word "Light", then the room it belongs to if it's specific to one rooms light. eg: automation.light_lounge_modes and sensor.light_default_mode. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the enhancement
The Activity view can currently be filtered by time range and specific targets, but not by arbitrary text.
I would like to add a free-text filter field that narrows Activity entries to matching results.
The filter should match the localized human-readable text shown for an Activity entry, while also allowing useful underlying identifiers and values such as entity IDs and raw state values.
At minimum, matching should support case-insensitive substring matching. Advanced query syntax is not required.
The text filter should combine with the existing time-range and target filters, so an entry must satisfy all active filters. It should apply to the Activity data for the selected time range, not just the rows currently rendered on screen.
Filtering should remove only non-matching entries and preserve the existing chronological order.
The existing reset action should also clear the text filter.
Use cases
Activity is frequently used to troubleshoot and reconstruct what happened in Home Assistant. When many entities change state, finding a particular event can require manually scanning a long timeline.
The attached screenshot shows a concrete example: several connectivity entities briefly become
Unavailable. Filtering forUnavailableshould immediately show the matching entries across all entities in the selected time range.The existing target filter works well when the relevant entity is already known. Text filtering is particularly useful when an investigation involves several entities, the relevant entity is not yet known, or the user remembers only a state, part of a name, an entity ID, or other text from an Activity entry.
The current alternatives are to select known targets in advance or manually scan the Activity timeline. Neither works well when the purpose of the investigation is to discover which entities were involved.
Visual examples
Anything else?
Similar requests existed in the former Home Assistant Community feature-request system:
https://community.home-assistant.io/t/enhance-logging-logbook-with-free-form-search-field/662866
https://community.home-assistant.io/t/filter-the-logbook-by-keyword/765474
Both request free-text filtering of Logbook entries without requiring the relevant entity to be known in advance.
The frontend already appears to contain reusable infrastructure for this, notably
ha-input-searchandcomputeLogbookItem(), which produces the human-readable representation used for Logbook entries. This may allow much of the feature to be implemented in the frontend, although the implementation approach should remain a maintainer decision.All reactions