Delay without Delay()?

    unsigned long value = mySwitch.getReceivedValue();


    switch (getReceivedValue()) {

This looks wrong.

You also didn't write a state machine. A state machine has some sort of state variable that changes within each state after some condition is met. You just implemented your if/else into a switch statement.