Excluded automation still shows up in logbook

I have an automation that I have explicitly excluded from recorder and logbook, but it still shows up in the logbook every time it runs. The offending automation is automation.clock_5sec which is named ‘Five Second Clock’

Here is my configuration.yaml:

recorder:
  purge_keep_days: 7
  exclude:
    entities:
      - sensor.time_since_last_motion
      - sensor.last_motion_with_time
      - input_boolean.clock_5sec
      - automation.clock_5sec

logbook:
  exclude:
    entities:
      - sensor.time_since_last_motion
      - sensor.last_motion_with_time
      - input_boolean.clock_5sec
      - automation.clock_5sec

Here is the automation:

  - id: clock_5sec
    alias: Five Second Clock
    trigger:
      - platform: time_pattern
        seconds: '/5'
    action:
      - service: homeassistant.toggle
        entity_id: input_boolean.clock_5sec

I don’t understand why this automation shows up in the logbook. Any ideas?

Is the automation called automation.clock_5sec or automation.five_second_clock?

Check the developer tools states menu.

1 Like

I think this is probably the right answer. My understanding is that id is used only for the Automation Editor UI. If you’re only using YAML and not the UI, id is not required.

1 Like

Yes, that was it. The automation id was not defining the name. Thank you.

The automation name is based on the alias parameter. It takes your alias and makes it all lower case then replaces any spaces with underscores. I believe special characters are also removed.

alias: [TIME] Check The Time

would become.

automation.time_check_the_time

If you create an automation with the UI you’ll notice the id is just a bunch of random numbers. I don’t think the id isn’t even required if you aren’t planning on using the UI automation editor.