How to prevent a log entry when an automation is executed?

In Home Assistant I have an automation which is triggered every time an MQTT message arrives in a MQTT topic.
Each time several log entries are written to home-assistant.log (see below).
Question: how can I prevent these log entries from appearing in the log?

2020-12-15 12:16:37 INFO (MainThread) [homeassistant.components.automation.domoticz_sensor_state_temp] zz Domoticz domoticz_sensor_state_temp: Running automation actions
2020-12-15 12:16:37 INFO (MainThread) [homeassistant.components.automation.domoticz_sensor_state_temp] zz Domoticz domoticz_sensor_state_temp: Executing step call service
2020-12-15 12:16:37 INFO (MainThread) [homeassistant.components.automation.domoticz_sensor_state_temp] zz Domoticz domoticz_sensor_state_temp: Test condition template: True
2020-12-15 12:16:37 INFO (MainThread) [homeassistant.components.automation.domoticz_sensor_state_temp] zz Domoticz domoticz_sensor_state_temp: Executing step call service

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

# configuration.yaml
logbook:
  exclude:
    domains:
      - automation

Thanks for the answer @GlennHA!
This turns off the messages for every automation.
How do I disable only for 1 automation?

I already have that ‘exclude’ line in my config. And the messages still keep appearing in my log file…

So I guess this entry only disables writing to the logbook, which is something different than the file home-assistant.log

There is no provision for exclusions for the system log.

There are options to define the logging level per integration:

Not sure if this will work for entities but you could try setting the logging level for your automation to something above info.

Thanks! I will give it a try

Thank you again Tom. I changed the log level of the Logger and the INFO entries are not written anymore to the log.

Yes this is an old topic. But yes it does appear to work for entities.

default: info
logs:
  homeassistant.components.automation.androidtv_scans: warning
2 Likes

For anyone wondering, that will only apply to the system log, it won’t stop logging to recorder/history/logbook. To prevent that you can add something like this to your configuration.yaml


recorder:
  exclude:
    entities:
      - automation.update_androidtv_every_2_secs
9 Likes

Yes, but that is not what the question asked.

That is what I was needing! Thanks!

This is the answer I was looking for as well for the sensor.time entity. Works great.

I did it but the strange thing is that now I opened the logbook just for something else, and it there, again.

I added the changed entity (only the automation was excluded until now), and restart the server and it looks good.

I will check it later to see if it comes back.