Slowly Learning PLEG

i have come to this 3 automation (and lost how to solved or if even possible)

  1. Door Sensor i want to activate/send email just between 1:00am and 9:00am

  2. if a Light is turned on i want to turned off after 30min for example.

Help if possible here

You should look in the right section:
Programming → Scene Scripting.

Look over:,17540.0.html

or for a different approach:,17669.0.html

Perfect everthing working