System Log automation

What am I doing wrong? I’ve read through this page a bunch of times.

https://www.home-assistant.io/integrations/system_log/

I’ve Added this and tried it without it.

fire_event string (Optional, default: false)
Whether events are fired (required when used for triggers).

# enable automation triggers.
system_log:
  fire_event: true

In /config/configuration.yaml

I’ve add this automation:

counter:
  warning_counter:
    name: Warnings
    icon: mdi:alert

automation:
  - alias: "Count warnings"
    trigger:
      platform: event
      event_type: system_log_event
      event_data:
        level: WARNING
    action:
      service: counter.increment
      target:
        entity_id: counter.warning_counter

And nothing ever triggers.

I am use the frontend

Try adding max_entries:

## configuration.yaml

system_log:
  max_entries: 50  ## or 500 or whatever
  fire_event: true

It started working after what seemed to be several restarts.

Note:
In my case I have this in place in the config. file

#enable automation triggers.
system_log:
fire_event: true

Interesting note:

    trigger:
      platform: event
      event_type: system_log_event
      event_data:
        level: ERROR

only trips for ERROR… not WARNING as in a the hierarchy I would have expected. just add a additional triggers as needed.

Another note.
90% of my Logs Errors are CAST related. And I get tons.