thisThis one also worked.:
if("diameter_valve" is NULL,
aggregate(
layer:= 'waterpipe_pipe'='waterpipe_pipe',
aggregate:='concatenate',
expression:=to_string("diameter"),
concatenator:=', ',
filter:= intersects=intersects($geometry, buffer( geometry(@parent), 0.0005))
) ),
"diameter_valve"
)