You could use [raycast][1].
You can set the distance of the raycast, so if it hits object, you know it is close enough. Now if that object is one you can interact with, you can popup a note to notify the user he can interact with it, and when he clicks do your action.
About the light switch on / off operation. Its is best if your light switch handles this. When user clicks, simply tell your switch, user clicked on you. And it should know "ok, i am on, i should turn off now".
[1]: http://docs.unity3d.com/ScriptReference/Physics.Raycast.html
↧