Seeking Advice on Setting Up a Morning Alarm with PLEG

Hello everyone, I’m new to PLEG and I’m eager to dive into creating some smart home automations. My first project is to set up a morning alarm system that gently wakes me up. Here’s what I’m aiming for:

Every weekday at 7:30 AM, I want the system to check if there’s motion in my bedroom. If there’s no motion, it should play a ‘wake up’ message through my Sonos speakers and start music at 40% volume. If I’m still not up after 5 minutes, it should announce another wake-up message and increase the volume to 60%. If I’m still not detected after another 5 minutes, it should sound a louder alarm at 80% volume. If motion is detected during this time, the volume should drop to 60%, announce the current weather, and keep the music playing for 20 minutes before turning it off.

I’ve tried setting this up with PLEG, but I’m struggling with the conditions and timers. I’m not sure how to structure the logic properly. Any guidance or examples would be greatly appreciated! I’m confident that with some help, I can get this working smoothly and expand my PLEG skills from there. Thanks in advance for your support!