core: Unable to (find a way to) Exclude ZHA Events from Logbook
The problem
Since I switched from Deconz to ZHA, my logbook is overrun with entries created by the ZHA Integration
I have found no way to prevent these entries from appearing in the logbook (which makes the logbook very difficult to read)

Having over 100 Zigbee devices this results in the Logbook consisting of about 70-75% ZHA Events with the remaining 25-30% being those events in which I have expressed an interest in being reported
I have attempted to exclude ZHA events in the logbook configuration by domain
logbook:
exclude:
domains:
- zha
I have attempted to exclude ZHA events in the logbook via recorder configuration where I can exclude event_types
recorder:
exclude:
event_types:
- zha_event
- zha.zha_event
Recorder config, IMO, should be the solution to remove these logbook entries - I can only imagine that I am targeting the wrong event_types, however this is how they appear in my (MariaDB) Database
I have attempted to prevent the logging in logbook by reducing the logging level for the integration (in the vain hope that this might be a factor)
logger:
default: info
logs:
homeassistant.components.zha: critical
I have verified that this issue occurs regardless of the Enable/Disable debug logging setting for the integration

I have attempted to identify in the codebase if and where any recorder and logbook exclusions are taken into consideration when the deciding to log into the logbook
What version of Home Assistant Core has the issue?
2022.12.8
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
ZHA, Logbook
Link to integration documentation on our website
https://www.home-assistant.io/integrations/zha/
Diagnostics information
No response
Example YAML snippet
Snippets from recorder and logbook configurations that I have tried to exclude these events from the logbook
recorder:
exclude:
event_types:
- zha_event
- zha.zha_event
logbook:
exclude:
domains:
- zha
### Anything in the logs that might be useful for us?
_No response_
### Additional information
Forum post concerning this matter (which has been present since August 2021 but has not, as far as I can see, been raised as an issue)
https://community.home-assistant.io/t/exclude-zha-events-from-logbook/452501/13
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 8
- Comments: 40 (1 by maintainers)
Issue is still present on 2023.11.0rc
Bump. The only reason that hasn’t been any activity on this lately is because we’re still waiting for the development team to chime in with their diagnosis.
Still ongoing on both web and phone.
+1 this issue, the lack of exclude filtering for the logbook in the ui, either temporary or ‘save preferences’ style, makes it very difficult to track a series of events and limits its usefulness. Now that I have a fairly large zigbee network I’m finding zha checkin event spam to create a ton of noise.
FWIW, I’ve managed to remove most of the ZHA stuff in the logbook with these bits of config. There’s still the bug where if you’re watching the live logbook update the ZHA events will appear, but they then disappear if you refresh the view, but I find this liveable-with.
The “logbook” section removes any events that don’t have a recognised filterable domain, so it’s a catch-all, and may remove some other events that you do care about…
Vote for it, that is annoying
+1 also having this issue. Would love to get these out of the Logbook
@luke7101 I’ve found most common blueprints for ZHA switches are always triggered by these update events also, but the logic within the automation means no action is taken. I’m not sure what kind of overhead this creates but similarly to the logbook it can spam automation traces making it harder to get useful info.
Why limit this to ZHA events? It would be great if we could click an event and ignore, trash, snooze any line item. Maybe
HA-PC-1 System Uptime changed to 29:16:22:25 2:50:22 PM - 2 minutes ago
HASPone p[2].b[4] displays a clock with a clock icon triggered by time pattern 2:50:00 PM - 2 minutes ago - Traces
Thanks doekwerk - you nailed it there
These events were definitely being added (interwoven) into the logbook AFTER the logbook page loads - it is something to do with the “previously introduced live logbook” mentioned on this page
https://rc.home-assistant.io/blog/2023/01/25/release-20232/#streaming-history
That does seem to be the case, although I would still like them to not be there
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (
logbook) you are listed as a code owner for? Thanks!Code owner commands
Code owners of
logbookcan trigger bot actions by commenting:@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleChange the title of the issue.@home-assistant reopenReopen the issue.@home-assistant unassign logbookRemoves the current integration label and assignees on the issue, add the integration domain after the command.(message by CodeOwnersMention)
logbook documentation logbook source (message by IssueLinks)
I noticed that with @AndreFjeld and @Teskanoo have Zigbee motion sensors that appear in the Logbook. With me it is only the Hue switches that appear unwanted in the Logbook. My motion sensors and lights do not have this problem. They are in the domain light and binary_sensor. My Hue switches however are in the zha domain and are stateless devices. They cause an zha_event. These switches don’t have an entity as such only for battery, update and binary_input. Since it has no entity we are not able to exclude it…
Hope someone knows how to change that.
+1 dito
Hey there @dmulcahey, @adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration (
zha) you are listed as a code owner for? Thanks!Code owner commands
Code owners of
zhacan trigger bot actions by commenting:@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleChange the title of the issue.@home-assistant reopenReopen the issue.@home-assistant unassign zhaRemoves the current integration label and assignees on the issue, add the integration domain after the command.(message by CodeOwnersMention)
zha documentation zha source (message by IssueLinks)