Unable to filter logbook entries logged in automation

I’m having issues with logbook entries created in an automation. The post looks great and works as expected (including connected entity) with the exception that the logpost is not visible when I filte rby the entity.

The test scenario I have is a counter helper entity called “testcounter”. When I run the automation below a logpost is created and the testcounter entity is attached, but when I filter by Entity “testcounter” (selected from the dropdown) the logpost is not included.

Automation (manual trigger)

alias: Test Logbook
description: ""
trigger: []
condition: []
action:
  - action: logbook.log
    metadata: {}
    data:
      name: TestCounter
      message: Was logged
      entity_id: counter.testcounter
mode: single

Am I doing something wrong?
Does this work for anyone else?
(the real scenario is writing a summary of what chores that was completed during the day for a child)

Screenshot

Hello Jonas,

Thanks for coming here and asking a question.

Would you be so kind as to adjusting the format of your code so that we can read it properly & check the YAML spacing, etc. It is very hard for us to tell what is what when the text formatter jumbles everything like that.
Use the </> button or this:
Here is an example of how to fix it from the site FAQ Page.
How to help us help you - or How to ask a good question.

Thanks, I’ve fixed the formatting.

Have you excluded the counter domain from being recorded?

I noticed yesterday, when trying to add a logbook entry for a non-recorded entity, that it did not appear when filtered but it had appeared in the unfiltered logbook when it was first written by my script.

Thanks, I just tested you suggestion. However I got the same result.
My automation had no domain given, so what I did was.

Added domain “counter” to the automation

alias: Test Logbook
description: ""
trigger: []
condition: []
action:
  - action: logbook.log
    metadata: {}
    data:
      name: TestCounter
      message: Was logged
      entity_id: counter.testcounter
      domain: counter
mode: single

Added to configuration.yaml (and reloaded config files)

logbook:
  include:
    domains:
      - counter

I was under the impression that for HA to recognise recorder setting changes, that HA actually needs to be reloaded.

Not sure if just reloading config from the list on the dev tools page does that. However I may be wrong.

I changed configuration.yaml to


logbook:
  include:
    domains:
      - counter
    entities:
      - counter.testcounter

After that I restarted HA.
Unfortunately, the same result. The logpost is visible and connected to the entity, but when selecting the entity in the entitity filter no logpost is visible.

HA is running the lastest version.