The device (1) for a washing machine, for supply of water to an underlying group of trays containing detergents, comprises: a shower group (2) which comprises a perforated base (28) from which a plurality of lateral walls (20) and internal walls (25) extend, which define water storage chambers (3) and channels (4) for conveying the water to the storage chambers (3), the shower group (2) being installable in the washing machine so that the perforated base (28) is arranged above the trays and faces the trays in order to enable water supply contained in the storage chambers (3); a closing cover (5) able to couple with the upper ends (200) of the lateral walls (20) and the internal walls (25) of the shower group (2) which define the storage chambers (3) and the conveying channels (4); a plurality of assembly channels (6) defined, in a coupling configuration (Z), by the closing cover (5) and the upper ends (200) of the lateral walls (20) and the internal walls (25) of the shower group (2); the assembly channels (6