Improvements Wishlist

Show duration sensors as hours and minutes, like Home Assistant does. not '0,20h'

keljicSuggested this wish ·

Sensors with device_class: duration show up on the screen as a raw decimal number with their unit. Home Assistant shows them as a readable duration instead.

Example: a duration sensor with unit h and a value of about 0.2.

Home Assistant shows: 0h, 13 Min. Tessera shows: 0,20h

Hours as decimals are bad to read at a glance, especially for short durations like run times, remaining times or uptimes.

What I’d like: For sensors with device_class: duration and a time unit (s, min, h, d), convert the value to seconds and show it with the duration format the firmware already has, e.g. 13 min, 3 h 20 min, 2 d 4 h. That format is already used for the history view on detail cards (history_view.h, duration()), so the tile value would look the same as the rest of the screen.

Why it fits: rounded_state() in the add-on aims to show a sensor “as Home Assistant shows it”, and it already respects the display precision. For duration sensors, Home Assistant’s frontend also turns the number into a duration, so this would close that gap.

Current workaround: changing the sensor’s display unit in Home Assistant to min. That gives 13 min, but longer values become 95 min instead of 1 h 35 min.

Discussion 0

Add a comment

Start the conversation

Share an example, ask a question or explain how you would use this.

Add your thoughts, a screenshot or a useful link.

Markdown & basic HTML
Paste or drop images · URLs on their own line become previews0 / 10,000
Create your account to join in

We need a verified email address to reach you about your contribution. Your address stays private.

Continue with GitHub

Your draft stays in this tab. Return here after verification.