Need help with scenario using a motion sensor

Yes, that’s all linked from the FAQ. There’s a ton of documentation in the community created wiki. You might also find the following thread helpful: