How to identify the wires on the dimmer to convert it to Conventional on/off switch
Wires that are green, yellow/green stripe, or bare, are always and only Protective Earth aka Equipment Safety Ground*.  They must only be connected to each other and never anything else.  That makes the green-white splice WRONG, and it should be removed immediately and attached to real ground where it belongs.  

Protective Earth is always a safety shield, and never figures into the actual wiring, so it is excluded from your thinking about how to arrange wires.

Now, voilà!  Things are simple. The two remaining black wires must be the wires to the switch. 



* on mains equipment which is legal to use in the US, i.e. Has a non-counterfeit stamp and file number from a Nationally Recognized Testing Lab.  If you acquire equipment from Alibaba, Aliexpress, EBay or Amazon, all bets are off...