I've no experience with electrical work so everything I've learned about this circuit has been cobbled together from youtube videos and subreddits.
I have a water pump in my back garden to pump water from a rain barrel to the garden. It runs off a battery that's solar-powered via a charge controller. Here are some details about parts:
Battery: Mighty Max ML18-12 | 12 V | 18 Ah
Pump: Shurflo 2088-554-144 | 12 V | 5.2 A | 62.4 W
I need to install a float switch into the rain barrel so that the pump won't run when the water is below a threshold. I've learned that I need a relay because the amperage will destroy the float switch. I've also been advised to include a diode to protect the float switch when the relay discharges. I've no experience with diodes or relays, but I've put together the following diagram to try to make sense of it.
There is 16 AWG wire used throughout except for the horizontal float switch which comes with 22 AWG wire. The relay I'm looking at online is the 12V Viair 93940.
Is this correct? If not, why not?