mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Make update restart sntp
This commit is contained in:
parent
6d315c6df9
commit
e7632ea16c
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,7 @@ void SNTPComponent::setup() {
|
|||
}
|
||||
#ifdef USE_ESP_IDF
|
||||
sntp_set_sync_interval(this->get_update_interval());
|
||||
this->stop_poller();
|
||||
#endif
|
||||
|
||||
ESP_LOGD(TAG, "Set notification callback");
|
||||
|
@ -79,6 +80,9 @@ void SNTPComponent::update() {
|
|||
sntp_init();
|
||||
}
|
||||
#endif
|
||||
#if defined(USE_ESP_IDF)
|
||||
sntp_restart();
|
||||
#endif
|
||||
}
|
||||
void SNTPComponent::loop() {
|
||||
for (const auto &item : callback_args_) {
|
||||
|
|
Loading…
Reference in a new issue