This is actually not always easy.
First, like rossko57 indicates, your light needs to report its current state when it is triggered outside of OH (e.g. the wall switch). Assuming that is the case, then you can use Design Pattern: Manual Trigger Detection.