Need help with logger

I have an ESP32 set up with ESPHome.
if a condition becomes true I want a message in system_log.

The code is as:

binary_sensor:
  - platform: gpio
    pin:
     number: 16
     mode: INPUT_PULLUP
     inverted: true
    name: "Button"
   
    filters:
     delayed_on_off: 50 ms

    on_multi_click:
    - timing:
        - ON for at most 0.5s
        - OFF for at least 1s
      then:
      # - logger.log: "ESP Button clicked"
        - logger.log:
            level: ERROR
            format: "ESP Button Clicked"
            tag: system_log

in the log of ESPHome I see:

[17:47:20][D][binary_sensor:036]: 'Scene Button': Sending state ON
[17:47:20][D][binary_sensor:036]: 'Scene Button': Sending state OFF
[17:47:21][E][system_log:367]: ESP Button Clicked 

but I can’t see it in system_log while I have added these lines to configuration.yaml file and restarted HA:

system_log:
  max_entries: 50
  fire_event: true
logger:
  default: info

What I want to do is trigger an automation base on the worlds in log.
Could you help me where I have made mistake?

Please format your post correctly How to help us help you - or How to ask a good question

1 Like