mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
Cleanup
This commit is contained in:
parent
93915dc6d4
commit
5ee8575f07
1 changed files with 2 additions and 4 deletions
|
@ -52,7 +52,6 @@ void SNTPComponent::dump_config() {
|
|||
ESP_LOGCONFIG(TAG, " Timezone: '%s'", this->timezone_.c_str());
|
||||
}
|
||||
void SNTPComponent::set_servers(const std::string &server_1, const std::string &server_2, const std::string &server_3) {
|
||||
#if !defined(USE_HOST)
|
||||
if (this->servers_was_setup_) {
|
||||
for (uint8_t i = 0; i < 3; ++i) {
|
||||
const auto &buff = this->servers_[i].empty() ? nullptr : this->servers_[i].c_str();
|
||||
|
@ -60,15 +59,14 @@ void SNTPComponent::set_servers(const std::string &server_1, const std::string &
|
|||
sntp_setservername(i, nullptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
this->servers_[0] = server_1;
|
||||
this->servers_[1] = server_2;
|
||||
this->servers_[2] = server_3;
|
||||
#if !defined(USE_HOST)
|
||||
|
||||
if (this->servers_was_setup_) {
|
||||
this->setup_servers_();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void SNTPComponent::update() {
|
||||
// force resync
|
||||
|
|
Loading…
Reference in a new issue