You can achieve friendly effect by setting base of generic.followRange
generic.followRange
attribute of a hostile mob to 0
. However doing so will completely disable targetting & tracking ability of a said mob. For example, here's the command to summon friendly blaze using this method:
/summon Blaze ~ ~1 ~ {Attributes:[{Name:generic.followRange,Base:0}]}