I did connect one of the solenoid valves to the switch and my adapter got burned after a few days. Would I need a resistor somewhere so things would run smoothly?
A valve needs 450mA to actuate. So for 2 valves your adapter should deliver nearly 1A of current. If the valve are operated for long period you should choose a larger adapter (say 12V/2A for example) so the adapter won’t overheat.
Edit
It is of good practice to put a rectifying diode in inverse (cathod to +12V, anod to minus) to protect the circuit from overvoltage that is generated when you switch off the valves.
It is an universal adapter with the following specifications: INput 230V~50Hz 20.5W and OUTput 1000mA at 3-4.5-6-7.5-9V and 900mA at 12V 10.8VA (max).
The thing is I only used one Solenoid and, like I said earlier, my adapter got burned. I looked inside it and it seems 2 out of 4 1N539 diodes it had inside actually got fried. I am guessing that one I change those diodes, it might work again. But I will definitely put a larger adapter!
Do you recommend a specific rectifier diode (a code)?