def METHOD_NAME(self, entity, attribute, old, new, kwargs):
    if old != new:
        if entity == globals.wendy_tracker and new != "home" and self.mode == "Morning":
            self.log("Wendy left - changing lighting")
            self.turn_on("scene.downstairs_on")