The intuition for $E[g(Y)|Y=y]$ would be that $g(Y)$ would play the role of a constant once $Y$ is fixed to a certain $y$ value. But how to show this more formally ? I can't seem to expand the equation below.
$E[g(Y)|Y=y]=\sum_{y} g(y)P[g(y)=y'|Y=y]$
Your error arises from using the same variable name for the index of summation as the given condition. More precisely, for a discrete random variable $Y$ with support $S$, $$\operatorname{E}[g(Y) \mid Y = y] = \sum_{a \in S} g(a) \Pr[Y = a \mid Y = y].$$ Since $\Pr[Y = a \mid Y = y] = \mathbb 1(a = y)$, it follows that the sum contains only one term and its value is $g(y)$.