From fe66f93a01ffc56229bc7f0dcc465207d91872ea Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 20 Feb 2019 12:38:09 +0100 Subject: [PATCH] Fix MQTT log topic level (#445) --- esphome/components/mqtt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/mqtt.py b/esphome/components/mqtt.py index 1956109c50..b98898c54f 100644 --- a/esphome/components/mqtt.py +++ b/esphome/components/mqtt.py @@ -163,8 +163,8 @@ def to_code(config): else: add(mqtt.set_log_message_template(exp_mqtt_message(log_topic))) - if CONF_LEVEL in config: - add(mqtt.set_log_level(logger.LOG_LEVELS[config[CONF_LEVEL]])) + if CONF_LEVEL in log_topic: + add(mqtt.set_log_level(logger.LOG_LEVELS[log_topic[CONF_LEVEL]])) if CONF_SSL_FINGERPRINTS in config: for fingerprint in config[CONF_SSL_FINGERPRINTS]: