This should fix the issue for you.
Part of the reason your controls were failing is, the keyboard and D-pad were fighting against each other. The D-pad x-axis was 0 so even though you pressed the keyboard arrow key, the angle was set back, etc... I combined some of the controls into a single event so they wouldn't fight and the 2 events for setting the piece idle, I placed before the ones that set it to rotating.
Here are a couple other things I did to get it working:
I pulled out the amount you are rotating by and placed it in a global variable. That way if you decide to change the value, you only have to change it 1 place. I added a global variable called state with 3 valid options: -1 for rotate left, 0 for idle and 1 for rotate right. Using a variable to represent state can make changes over time a little easier to work with. I used the state to define when the sprite is rotating and which direction. Finally, to create the smooth transition back to the original state, I checked to see if the left and right buttons were released and if the controller x-axis was 0. If so, I set the state back to 0 for idle. When the state is 0, I transition the sprite back to 0 rotation.
I hope that helps and good luck with you project.