I have something similar to what steven r describes in my setup and it works really well. In my case I have a timer run a macro to clear the flag at 7:00pm and have a bunch of the macros I commonly use set the flag. That way if I am home, the lights won't turn off before I go to bed (unless for some reason I don't run any of the appropriate macros). I then have a "goodnight" macro which I can run from my bedside table that will turn off all of the lights downstairs, outside and in the bedroom. Also, just to be safe, I have another macro-timer which will turn off all the downstairs and outside lights at 3:00am.
Eventually I want to use a motion sensor to more reliably detect if someone is home.