The Met Office issued a yellow warning of spells of rain which could lead to localised flooding covering South and West Wales until 9pm on Tuesday.