Hello there! I’ve been getting pretty annoyed while trying to display a time value of a custom sensor as such in the frontend, but HASS keeps converting it into decimals, no matter what kind of template code I write. Important distinction. If I click on the card, the detail window shows the correct HH:MM:SS structure.
Ideally, I’d have HH:MM on the dashboard as well. How do I achieve this? Does anyone have an idea?
This is the sensor code, tracking how long a switch has been “on”:
sensor:
- platform: history_stats
name: Mara Switch On Time
entity_id: switch.steckdose_mara_switch
state: "on"
type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'