mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Fixups
This commit is contained in:
parent
82fe2086e0
commit
8824324d1f
1 changed files with 3 additions and 8 deletions
|
@ -54,13 +54,12 @@ void SNTPComponent::setup() {
|
|||
sntp_setservername(2, strdup(this->server_3_.c_str()));
|
||||
}
|
||||
#ifdef USE_ESP_IDF
|
||||
sntp_set_sync_interval(this->get_update_interval());
|
||||
this->stop_poller();
|
||||
#endif
|
||||
|
||||
ESP_LOGD(TAG, "Set notification callback");
|
||||
sntp_set_time_sync_notification_cb(sntp_sync_time_cb);
|
||||
|
||||
sntp_set_sync_interval(this->get_update_interval());
|
||||
this->stop_poller();
|
||||
#endif
|
||||
sntp_init();
|
||||
#endif
|
||||
}
|
||||
|
@ -80,10 +79,6 @@ void SNTPComponent::update() {
|
|||
sntp_init();
|
||||
}
|
||||
#endif
|
||||
#if defined(USE_ESP_IDF)
|
||||
this->has_time_ = false;
|
||||
sntp_restart();
|
||||
#endif
|
||||
}
|
||||
void SNTPComponent::loop() {
|
||||
#if defined(USE_ESP_IDF)
|
||||
|
|
Loading…
Reference in a new issue