Help changing this IR sketch to RF

You have code to change state from 1 to 0 but I don't see any code to change it back to 1.

...R