Template: remove seconds and miliseconds from a sensor value and store it in a helper

who knows how i can remove seconds and miliseconds (keeping only minutes) from a sensor value with a template and store it in a helper?

Instead of a helper, why not simply create a Template Sensor that displays the other sensor’s value without the seconds and milliseconds?

Post an example of the sensor’s value so we can show you the appropriate template needed to remove seconds and milliseconds.