From b5cdb9f5c5496fba0c60e1c358cece9ba62adcc6 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Thu, 27 Dec 2018 15:25:51 +0100 Subject: [PATCH] Fix MQTT message trigger Fixes https://github.com/OttoWinter/esphomelib/issues/335 --- esphomeyaml/components/mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphomeyaml/components/mqtt.py b/esphomeyaml/components/mqtt.py index 28f165c5041..4276cadcab9 100644 --- a/esphomeyaml/components/mqtt.py +++ b/esphomeyaml/components/mqtt.py @@ -173,7 +173,7 @@ def to_code(config): add(mqtt.set_reboot_timeout(config[CONF_REBOOT_TIMEOUT])) for conf in config.get(CONF_ON_MESSAGE, []): - rhs = mqtt.make_message_trigger(conf[CONF_TOPIC]) + rhs = App.register_component(mqtt.make_message_trigger(conf[CONF_TOPIC])) trigger = Pvariable(conf[CONF_TRIGGER_ID], rhs) if CONF_QOS in conf: add(trigger.set_qos(conf[CONF_QOS]))