How to stop controller vibration on minimize

I’m using the XInputDotNet plugin for Unity to control vibration in my controller. I’ve found that if the controller is in a vibrating state and I minimize the game, it will continue to vibrate indefinitely. I’m not aware of any way to run a piece of code “on minimize”… Wondering if there’s actually a solution to this bug?

Have you tried stopping/preventing vibration using OnApplicationFocus()? You should potentially be able to use a global value to determine whether the controller is or isn’t allowed to vibrate through there.