mirror of
https://github.com/esphome/esphome.git
synced 2026-10-03 01:35:59 +00: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:
@@ -38,6 +38,8 @@ void RealTimeClock::synchronize_epoch_(uint32_t epoch) {
|
||||
char buf[128];
|
||||
time.strftime(buf, sizeof(buf), "%c");
|
||||
ESP_LOGD(TAG, "Synchronized time: %s", buf);
|
||||
|
||||
this->time_sync_callback_.call();
|
||||
}
|
||||
|
||||
size_t ESPTime::strftime(char *buffer, size_t buffer_len, const char *format) {
|
||||
|
||||
Reference in New Issue
Block a user