History_stats sensor time format

I have history_stats sensors that previously displayed time as fractional hours. To make this display in h:m I used a template sensor using the timestamp function. The display worked as expected but it has a downside. Since timestamp or any of the time related functions generate time as a text string, the ability to display a graphical representation of the sensor is lost. Recreating the template in the template sensor integration helper and including the UOM as h allows the sensor to be graphed but it only displays the integer value of hours. Now I find that, due to system updates, the value of the original history_stats sensor is displayed as h:m:s which is okay although I would prefer to truncate the seconds display. Is there a a non string function to achieve this. Obviously, anything that results in a text string would not work.