Your firstOne direction: yours is a bit too strong. Letlet $\varepsilon>0$ and taken $N$ such that $\sum_{n>N}a_n<\frac12\varepsilon$. Take $\delta>0$ such that $\delta\cdot\sum_{n\le N}a_n<\frac12\varepsilon$. Now if $d_n(x,y)<\delta$ for all $n\le N$ then $$ d(x,y)< \delta\cdot\sum_{n\le N}a_n+\sum_{n>N}a_n<\varepsilon $$ (because $d_n(x,y)/(1+d_n(x,y))\le d_n(x,y)$ always).
For the second direction: you have $a_n\cdot d_n(x,y)/(1+d_n(x,y))\le d(x,y)$. Then from $d(x,y)\le\frac12a_n$ you get $d_n(x,y)/(1+d_n(x,y))\le\frac12$ and then $d_n(x,y)\le1$. And from this you get $\frac12d_n(x,y)\le d_n(x,y)/(1+d_n(x,y))$. In summary: if $d(x,y)\le\frac12a_n$ then $\frac{a_n}2d_n(x,y)\le d(x,y)$, so you have an explicit formula for $\delta$ in terms of $\varepsilon$ to show uniform continuity of the identity.