Fixed relay_controller to check for correct on / off values