Is the expected value of a probability over an interval meaningful? I am reading an unpublished manuscript and have come across an equation of the following form for the calculation of the probability of an even A,
$$
P[A]=E\Big[P[X>x|Y]\Big]. \tag{1} \label{1}
$$
This is very confusing. The conditional probability $P[X>x|Y]$ must be a number, say $c$ in the interval $[0,1]$ i.e. $P[X>x|Y]=c$. Therefore, \eqref{1} simply reduces to,
$$
P[A]=E[c]=c, \tag{2} \label{2}
$$
as the expected value of a constant is the constant itself. Therefore, using the expected value of the probability seems meaningless, and the following should be sufficient to find the probability of event A,
$$
P[A]=P[X>x|Y]. \tag{3} \label{3}
$$
Is that so or do I miss something? Is it correct and meaningful to use an equation of the form given in \eqref{1}?

Requested from comments:
I would have thought $P[X>x\mid Y]$ was a function of $Y$ and so a random variable for which it is reasonable to take the expectation over the distribution of $Y$.
It looks to me as if $A$ is the event $X>x$ (or at least has the same probability) and $X$ is dependent on $Y$.
