Which (Pentax) camera do you use? There was an issue with Yongnuo flashes on the K5; it could be solved with some DIY. See
https://www.pentaxforums.com/forums/115-pentax-k-5/162331-mounted-yn-560-flash-problem.html With the K5, I suspect that Pentax changed the electronics of the trigger circuit slightly from previous models. Not sure if they reverted the change in models after the K5.
Note that there is no real standard for the 'signal' on the center pin. So in this case it's a 'simple' and very annoying incompatibility issue.