mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
Fix MQTT logs
This commit is contained in:
parent
b6e7ad3589
commit
19dfdb77eb
@ -10,7 +10,7 @@ from esphomeyaml import core
|
|||||||
from esphomeyaml.const import CONF_BROKER, CONF_DISCOVERY_PREFIX, CONF_ESPHOMEYAML, \
|
from esphomeyaml.const import CONF_BROKER, CONF_DISCOVERY_PREFIX, CONF_ESPHOMEYAML, \
|
||||||
CONF_LOG_TOPIC, \
|
CONF_LOG_TOPIC, \
|
||||||
CONF_MQTT, CONF_NAME, CONF_PASSWORD, CONF_PORT, CONF_TOPIC_PREFIX, \
|
CONF_MQTT, CONF_NAME, CONF_PASSWORD, CONF_PORT, CONF_TOPIC_PREFIX, \
|
||||||
CONF_USERNAME
|
CONF_USERNAME, CONF_TOPIC
|
||||||
from esphomeyaml.helpers import color
|
from esphomeyaml.helpers import color
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -45,7 +45,7 @@ def show_logs(config, topic=None, username=None, password=None, client_id=None,
|
|||||||
elif CONF_MQTT in config:
|
elif CONF_MQTT in config:
|
||||||
conf = config[CONF_MQTT]
|
conf = config[CONF_MQTT]
|
||||||
if CONF_LOG_TOPIC in conf:
|
if CONF_LOG_TOPIC in conf:
|
||||||
topic = config[CONF_MQTT][CONF_LOG_TOPIC]
|
topic = config[CONF_MQTT][CONF_LOG_TOPIC][CONF_TOPIC]
|
||||||
elif CONF_TOPIC_PREFIX in config[CONF_MQTT]:
|
elif CONF_TOPIC_PREFIX in config[CONF_MQTT]:
|
||||||
topic = config[CONF_MQTT][CONF_TOPIC_PREFIX] + u'/debug'
|
topic = config[CONF_MQTT][CONF_TOPIC_PREFIX] + u'/debug'
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user