Step-wise current using PyBaMM v 25.6.0

I’m trying to simulate a battery with a step-wise current profile using PyBaMM version 25.6.0. I’ve defined a function to represent the current that changes value at a specific time. However, when I assign this function (or variations using pybamm.step , pybamm.Piecewise , or pybamm. Interpolant ) to param[“Current function [A]”] , I consistently get the error Boolean operator not defined for Symbols . Could someone please advise on the correct method to define a time-dependent current function with step changes in PyBaMM that is compatible with its symbolic framework and avoids this error?

Just to mention, I’m running this code on Google Colab — could that cause any issues?