From ec791063b383fbe068e4c9c6a418905016abc9ba Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 22 Jan 2026 11:27:04 -1000 Subject: [PATCH] [time] Always call time sync callbacks even when time unchanged (#13456) --- esphome/components/time/real_time_clock.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/components/time/real_time_clock.cpp b/esphome/components/time/real_time_clock.cpp index f217d14c55..f53a0a7cf7 100644 --- a/esphome/components/time/real_time_clock.cpp +++ b/esphome/components/time/real_time_clock.cpp @@ -40,6 +40,9 @@ void RealTimeClock::synchronize_epoch_(uint32_t epoch) { // Unsigned subtraction handles wraparound correctly, then cast to signed int32_t diff = static_cast(epoch - static_cast(current_time)); if (diff >= -1 && diff <= 1) { + // Time is already synchronized, but still call callbacks so components + // waiting for time sync (e.g., uptime timestamp sensor) can initialize + this->time_sync_callback_.call(); return; } }