Exclude automation trigger/run from log file?

Is there a way to exclude an automation from not only the logbook (I’ve done this), but also home-assistant.log?

I’ve written an automation to capture the RSSI value from all my tasmota devices when they report it over MQTT. It works well, but given that I have quite a number of devices all checking in at least every 5 minutes, it’s very chatty in my log file, to the point that I can’t easily pick out anything else.

I’m confident that it won’t be logging any errors, so is there a way I can just get it to not log when this particular automation is triggered and run?

I believe, if you add aliases you maybe able to filter them through logger. Haven’t tried though.

wouldn’t it be easier to change the default log level to something more restrictive instead of it filling your logs with everything else too?

Is there some reason you need to log everything except those particular automations?

You know, sometimes I feel really dumb when it comes to these things, because changing my log configuration absolutely did the trick. I have been running HA for nearly 2 years now, and literally never looked into configuring the logger component.

I just changed mine from this:

logger:
  default: info

to this:

logger:
  default: info
  logs:
    homeassistant.helpers.script: warning
    homeassistant.components.python_script: warning

And that pretty much fixed my problem. I didn’t want to lower the log level for homeassistant.components.automation, but that is the only other thing that gets logged for the noisy automation.

1 Like

Speaking of other things I’d like to exclude from my log file, have you guys been seeing this one lately, i.e., since v0.100?

ERROR (MainThread) [homeassistant.core] Error doing job: An open stream object is being garbage collected; call "stream.close()" explicitly.

This seems like a warning at best.

    homeassistant.core: critical

should do the trick

Oh yeah, I know how to hide it. But it seems like a new thing that’s not deserving of an error.

I honestly think that’s a bug in a component. I don’t ever see that error and the fix is built into the error

Most likely a camera integration or component