Has anyone set up a good way to trigger automations *when they're actually awake/out of bed*?

Could you post the code for that part where you set the time of day boundary?