log received mqtt messages (#2031)

This commit is contained in:
Erik Eriksson 2016-05-11 06:12:14 +02:00 committed by Paulus Schoutsen
parent a7d1f52ac8
commit 2f118c5327

View File

@ -388,6 +388,8 @@ class MQTT(object):
def _mqtt_on_message(self, _mqttc, _userdata, msg):
"""Message received callback."""
_LOGGER.debug("received message on %s: %s",
msg.topic, msg.payload.decode('utf-8'))
self.hass.bus.fire(EVENT_MQTT_MESSAGE_RECEIVED, {
ATTR_TOPIC: msg.topic,
ATTR_QOS: msg.qos,