[api] Fix clock conflicts when multiple clients connected to homeassistant time (#13253)

This commit is contained in:
J. Nick Koston authored and Jonathan Swoboda committed 2026-01-16 23:05:59 -05:00
1 parent 973fc4c5dc
commit edb303e495
2 files changed
+15 -1

No files matched your search

+3 -1
View File
@@ -558,8 +558,10 @@ bool APIServer::clear_noise_psk(bool make_active) {
#ifdef USE_HOMEASSISTANT_TIME
void APIServer::request_time() {
for (auto &client : this->clients_) {
if (!client->flags_.remove && client->is_authenticated())
if (!client->flags_.remove && client->is_authenticated()) {
client->send_time_request();
return; // Only request from one client to avoid clock conflicts
}
}
}
#endif