Ok everyone slam on the brakes editing the .py files!!! I may have stumbled upon a stupid simple solution that should be much easier for anyone to implement.
The MQTT messages are logged as level “warning”, so just configure the logger to ignore anything less than “error”. Like this in configuration.yaml:
logger:
default: warning
logs:
homeassistant.components.mqtt: error
And done. Everything else (the default: line) will log at “warning” or higher, while MQTT will log at “error” or higher. My log now has the same messages as before I started. I have deleted my custom MQTT component.
Here are the two docs that describe this:
I’m on 0.86.2 now. No idea when the above logger configuration ability was introduced, but it’s there now.