The state, just like I said.
if(items["MySwitch"] == ON) {
Well, it was a shot in the dark. Because Rules DSL imports event I figured it might import ir and items too. I guess not. If you ever find a need to get access to the ir from Rules DSL see Design Pattern: Associated Items (scroll down to the Item Registry section).