mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
Fix MQTT message trigger (#282)
Fixes https://github.com/OttoWinter/esphomelib/issues/335
This commit is contained in:
parent
2b432ea829
commit
eddaee3a80
1 changed files with 1 additions and 1 deletions
|
@ -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]))
|
||||
|
|
Loading…
Reference in a new issue