Lie algebra elements commuting with a principal nilpotent element Let $\mathfrak{g}$ be a semisimple complex Lie algebra, $A \in \mathfrak{g}$ a principal nilpotent element (i.e. its centralizer is of dimension equal to the rank of $\mathfrak{g}$). I wish to understand the set of elements which commute with A. 
More specifically, given an irreducible finite-dimensional representation $r$ of $\mathfrak{g}$, the answer seems to be the set of all polynomials $P$ applied to $r(A)$ such that the result is still in the image $r(\mathfrak{g})$. Is that true? Is the space $P \in \mathbb{C}[x]$ with $P(r(A)) \in r(\mathfrak{g})$ of dimension the rank of $\mathfrak{g}$ ?
For example take $\mathfrak{sl}_n$ with standard representation and $A$ the matrix with 1 on the over-diagonal. Then a matrix $B$ commutes with $A$ iff $B=P(A)$ with $P$ a polynomial without constant term and of degree smaller than $n$.
This is due to the fact that $A$ is cyclic here.
I also verified the statement for $\mathfrak{so}(2n)$ with the standard representation. But I have no clue how to do it in general.
Edit: follow-up question.
 A: It fails with the adjoint representation of $\mathfrak{sl}_3$.
In general, denoting by $\mathfrak{z}_\mathfrak{g}(A)$ the centralizer of $A$ in $\mathfrak{g}$, we have the obvious inclusions
$$\mathbf{C}r(A)\subseteq\mathbf{C}[r(A)]\cap r(\mathfrak{g})\subseteq r(\mathfrak{z}_\mathfrak{g}(A)),$$
and the question is whether the right-hand inclusion is an equality. Note that this is clear if $\mathfrak{g}$ has rank 1 (because of the left-hand inclusion).
Now consider $\mathfrak{sl}_3$, with $A=\begin{pmatrix}0 & 1 & 0\\ 0 & 0 & 1\\0 & 0 & 0\end{pmatrix}$, and $B=A^2$ (so the centralizer of $A$ in $\mathfrak{g}$ has the basis $(A,B)$, the basis $(E_{ij})$ of $\mathfrak{gl}_3$, and the adjoint representation, with $\alpha=\mathfrak{ad}(A)$, $\beta=\mathfrak{ad}(B)$. I claim that $\beta\notin\mathbf{C}[\alpha]$.
It suffices to compute. Suppose by contradiction that $\beta=P(\alpha)$ for some polynomial $P=\sum_{k\ge 0}a_kt^k$. 
Since $\alpha,\beta$ are nilpotent, taking the trace we have $a_0=0$. 
Then we have $\alpha(E_{23})\neq 0=\alpha^2(E_{23})=\beta(E_{23})$. This implies that $a_1=0$.  Then $\beta(E_{31})=E_{11}-E_{33}$ while
$$\alpha(E_{31})=-E_{32}+E_{21},\;\alpha^{2}(E_{31})=E_{11}-E_{33},\;\alpha^3(E_{31})=-A;\;\alpha^{k\ge 4}(E_{31})=0.$$
Evaluating $\beta=P(\alpha)$ on $E_{31}$, we deduce $a_2=1$. In turn, $\beta(E_{11}-E_{22})=-E_{13}$, while 
$$\alpha(E_{11}-E_{22})=-2E_{12}+E_{23},\;\alpha^2(E_{11}-E_{22})=3E_{13};\; \alpha^{k\ge 3}(E_{11}-E_{22})=0,$$
which would lead to $a_2=-1/3$, and we have a contradiction.
