I can't wrap my head around the way to compute conditional expectation with respect to a continuous random variable. For instance, consider a probability space $(\Omega, A, P)$, where $\Omega = [0,1]$ and $A$ is a corresponding Borel $\sigma$-algebra. Let's define random variables $X(\omega)=\omega$ and $Y=\sin (\pi \omega)$. How does one compute the expression for $\mathbb{E}(X\mid \mathcal{B})$, where $\mathcal{B}$ is the $\sigma$-algebra generated by $Y$?
If $Y$ was discrete, such as $$ Y = \begin{cases} 1,&\omega\in[0,1/2]\\ 0,&\omega\in(1/2,1] \end{cases} ,$$
then I understand that $\mathbb{E}(X\mid \mathcal{B})$ would be equal to $$ \mathbb{E}(X\mid \mathcal{B}) = \frac{1}{4}\mathbb{I}_{Y=1}+\frac{1}{4}\mathbb{I}_{Y=0}. $$
However, in the continuous case I'm not so sure. My intuition suggests that it's something like $\sin^{-1}(y)/\pi$; however, then $$ \mathbb{E}(\mathbb{E}(X\mid Y)) = \int_Y \mathbb{E}(X\mid Y)d\omega = \frac{2}{\pi}\cdot\int_0^1 \arcsin(y) dy \neq \mathbb{E}(X). $$