I'm having trouble proving this, using the fact $P^k=P$.
($P \in L(V)$ where $V$ is a finite-dimensional complex vector space.)
Here's my work (I didn't use $P^k=P$, but it still looks valid to me which is why it's doubtful.)
Suppose $P \neq I$.
$\Rightarrow \exists v \in V$ s.t. $Pv \neq v$.
$\Rightarrow Pv-v \neq 0$.
$\Rightarrow v \notin N(P-I) \subseteq N((P-I)^n)$ where $n =$ dim $V$.
But, since $1$ is the only eigenvalue of $P$, the characteristic polynomial of $P$ is $$q(z)=(z-1)^n$$
So, by Cayley-Hamilton, $q(P)=(P-I)^n=0$
Thus, $q(P)v=0$. And, this is a contradiction.
Hence, $P=I$.
Is there anything I'm missing in this proof?
A proof that uses some of the ideas you tried to:
Let $f(x)$ be the minimal polynomial of $P$. The equation $P^k = P$ implies that $f(x)$ divides $x^k -x$. As you stated, the characteristic polynomial is $(x-1)^n$. Since $f(x)$ also divides the characteristic polynomial, $f(x)$ divides $\text{gcd}(x^k-x\ , \ (x-1)^n)$ which is $(x-1)$. So $P - I = 0$.