mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Fix MQTT Not Working in dev branch (#527)
* Fix MQTT not working * Fix minor typo causing compile error
This commit is contained in:
		| @@ -150,12 +150,13 @@ def exp_mqtt_message(config): | ||||
|  | ||||
| @coroutine_with_priority(40.0) | ||||
| def to_code(config): | ||||
|     var = cg.new_Pvariable(config[CONF_ID]) | ||||
|     yield cg.register_component(var, 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])) | ||||
|     cg.add(var.set_broker_port(config[CONF_PORT])) | ||||
|     cg.add(var.set_username(config[CONF_USERNAME])) | ||||
|   | ||||
| @@ -55,7 +55,7 @@ template<typename... Ts> class Trigger { | ||||
|   bool is_running() { | ||||
|     if (this->automation_parent_ == nullptr) | ||||
|       return false; | ||||
|     return this->automation_parent_.is_running(); | ||||
|     return this->automation_parent_->is_running(); | ||||
|   } | ||||
|  | ||||
|  protected: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user