Example 7 Find the range of real number $a$ for which the equation $\sqrt{a+\sqrt{a+\sin x}}=\sin x$ has real solutions.

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.