CoRE - Get peer assistance here with setting up Pistons

My wife often forgets to turn off our A/V receiver when she leaves the house or goes to bed for the night and I was wondering if there was someway to automate turning the receiver off, such as with a Goodnight routine or using our presence sensors (phone/fob). I am using the Yamaha Network Receiver smartapp and device handlers. Thanks!