the values of the PID module (PID_stable, PID_in_range and PID_stable_change) are passed as numpy.float64 when transferred to a custom function, whereby they are boolen values or an int value (PID_stable_change). This occurs in version 1.5.6, in version 1.5.5 it still works. It is possible to convert the values to boolean, but this is not the solution.
In the meantime, I think adding a bool conversion to your custom function is a workaround that works with both versions and makes sure you have correct data type. The values for PID_stable, PID_in_range and PID_stable_change should still be always 0.0 or 1.0 and allow for a proper conversion.
Your problem is probably related to how some data types are saved in the data manager of SweepMe! in version 1.5.6, a problem related to this issue