Does anyone have any bright ideas on how to convert the output of a history_stats sensor to hours and min (h:m)? Since the upgrade to HA 2022.6 several of my history_stats sensors are displaying h:m:s, while previously they only displayed fractional hours.
I have made some attempts to do this within the histor_stats sensor definition but a working methodology has escaped me. I have fixed one of the sensors by creating yet another template sensor to do the conversion but I was hoping for a more elegant solution.
Sample history_stat sensor:
# Today's hot water running time.
- platform: history_stats
name: HW_OnTime
entity_id: binary_sensor.electric_water_heater_running
state: "on"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"