Binary sensor state after restart

Look at this topic :

and use the retain flag