It came to me after doing the same thing with my Android phone using Tasker & Sharptools. The real advantage is now that I have very accurate sleep/awake triggers I can use those to set the routines or modes in the rest of the house and use them to trigger other things.
Here is the piston using a ST outlet to monitor the energy usage. (Important to keep in mind that the usage will decrease when the phone is 100% charged. I had the wattage higher initially then saw it dropped when fully charged and sitting on the charger) The switch turns on the sleep sensor function via a virtual switch. You could have it directly linked to the presence sensor status but I am using the virtual switch for other pistons as well.