Send debug log over MQTT but not config log

By default ESPHome sends a config dump (the log lines with [C]) over MQTT after waking up from deep sleep. This clogs the connection and costs battery and I don’t really use it.

Is there a way to suppress this config dump, but still keep debug-level log messages?

You don’t show your code, but try to set the global log level to lower severity to get rid of “config dump” and at the end of boot switch back to debug

- logger.set_level:
        level: DEBUG

You mean something like this?

esphome:
  on_boot:
    - then:
        - logger.set_level: DEBUG

logger:
  level: DEBUG
  initial_level: WARN

Hm, that might work.

try on_boot with
- priority: -200