mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-31 18:18:27 +02:00
time sync notification (#1442)
* add on_time_sync trigger * cleanup lint * fix review remark (sntp didn't trigger callbacks)
This commit is contained in:
@@ -54,6 +54,7 @@ void SNTPComponent::loop() {
|
||||
char buf[128];
|
||||
time.strftime(buf, sizeof(buf), "%c");
|
||||
ESP_LOGD(TAG, "Synchronized time: %s", buf);
|
||||
this->time_sync_callback_.call();
|
||||
this->has_time_ = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user