diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp index 3578e2be6eb8eb..fbee38fc54b0d0 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp +++ b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp @@ -1095,7 +1095,7 @@ bool emberAfTimeSynchronizationClusterSetUTCTimeCallback( commandObj->AddStatus(commandPath, Status::InvalidCommand); return true; } - if (timeSource.HasValue() && (timeSource.Value() < TimeSourceEnum::kNone || timeSource.Value() > TimeSourceEnum::kGnss)) + if (timeSource.HasValue() && timeSource.Value() == TimeSourceEnum::kUnknownEnumValue) { commandObj->AddStatus(commandPath, Status::InvalidCommand); return true;