mirror of
https://github.com/esphome/esphome.git
synced 2025-09-13 16:52:18 +01:00
Updates
This commit is contained in:
@@ -150,6 +150,10 @@ def exp_mqtt_message(config):
|
||||
|
||||
@coroutine_with_priority(40.0)
|
||||
def to_code(config):
|
||||
cg.add_library('AsyncMqttClient', '0.8.2')
|
||||
cg.add_define('USE_MQTT')
|
||||
cg.add_global(mqtt_ns.using)
|
||||
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
|
||||
cg.add(var.set_broker_address(config[CONF_BROKER]))
|
||||
@@ -217,10 +221,6 @@ def to_code(config):
|
||||
trig = cg.new_Pvariable(conf[CONF_TRIGGER_ID], conf[CONF_TOPIC], conf[CONF_QOS])
|
||||
yield automation.build_automation(trig, [(cg.JsonObjectConstRef, 'x')], conf)
|
||||
|
||||
cg.add_library('AsyncMqttClient', '0.8.2')
|
||||
cg.add_define('USE_MQTT')
|
||||
cg.add_global(mqtt_ns.using)
|
||||
|
||||
|
||||
MQTT_PUBLISH_ACTION_SCHEMA = cv.Schema({
|
||||
cv.GenerateID(): cv.use_id(MQTTClientComponent),
|
||||
|
Reference in New Issue
Block a user