Show that $E(X)$ = $E( X|Y=y1 * 1(Y=y1)+ X|Y=y2 * 1(Y=y2) )$

where $Y$ can be either $y1$ or $y2$ with some probabilities.

I suppose the result will not be restricted to $Y$ being binary, and the proof should extend.