def arrive(): s = getState() s['people'] = s.get("people", 0) + 1 saveState(s) if s['people'] == 1: home.on() return "You're the first to come home; turning on!" return "Welcome home! There are now %d people here." % s['people']
def turnOn(): home.on() return "ok"