style: formatting

This commit is contained in:
Yurii
2025-01-14 06:22:04 +03:00
parent 0425cdc499
commit 57f1129cee

View File

@@ -197,14 +197,13 @@ protected:
this->haHelper->setDevicePrefix(settings.mqtt.prefix); this->haHelper->setDevicePrefix(settings.mqtt.prefix);
this->haHelper->updateCachedTopics(); this->haHelper->updateCachedTopics();
this->client->stop(); this->client->stop();
this->client->setId(networkSettings.hostname); this->client->setId(networkSettings.hostname);
this->client->setUsernamePassword(settings.mqtt.user, settings.mqtt.password); this->client->setUsernamePassword(settings.mqtt.user, settings.mqtt.password);
this->client->beginWill(this->haHelper->getDeviceTopic(F("status")).c_str(), 7, true, 1); this->client->beginWill(this->haHelper->getDeviceTopic(F("status")).c_str(), 7, true, 1);
this->client->print(F("offline")); this->client->print(F("offline"));
this->client->endWill(); this->client->endWill();
this->client->connect(settings.mqtt.server, settings.mqtt.port); this->client->connect(settings.mqtt.server, settings.mqtt.port);
this->lastReconnectTime = millis(); this->lastReconnectTime = millis();
this->yield(); this->yield();