1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-26 15:12:21 +01:00

Fix: Make MQTT over TLS actually work (#3580)

This commit is contained in:
ShellAddicted
2022-06-20 01:17:58 +02:00
committed by Jesse Hills
parent 8a055675af
commit d0c646c721

View File

@@ -187,7 +187,7 @@ void MQTTClientComponent::start_connect_() {
this->mqtt_backend_.set_credentials(username, password); this->mqtt_backend_.set_credentials(username, password);
this->mqtt_backend_.set_server((uint32_t) this->ip_, this->credentials_.port); this->mqtt_backend_.set_server(this->credentials_.address.c_str(), this->credentials_.port);
if (!this->last_will_.topic.empty()) { if (!this->last_will_.topic.empty()) {
this->mqtt_backend_.set_will(this->last_will_.topic.c_str(), this->last_will_.qos, this->last_will_.retain, this->mqtt_backend_.set_will(this->last_will_.topic.c_str(), this->last_will_.qos, this->last_will_.retain,
this->last_will_.payload.c_str()); this->last_will_.payload.c_str());