Rule to trigger plug for a few minutes and then off

Is there a way to create a rule that uses motion detected by the Wyze camera to turn on the Wyze plug for 10 minutes and then turn it off during certain hours (ex: 2200 to 0700) ?