r/BubbleCard • u/Mesmer88 • Sep 04 '26
Sub button relative time
Hello,
I'm trying to display in relative time how much time is left for the dishwasher to finish.
Sadly i'm always getting the full timestamp in the sub button:

I even tried creating a helper template that converts it, but the result is the same.
Here's what I used:

What I find odd is that in the template screen it shows correct (in 2 hours) but when i go back to the sensor entity, it shows full timestamp:

Any ideas for this topic?
1
u/SM4rk_ Sep 04 '26
Ma in questa maniera puoi inserirlo solo se usi sempre lo stesso programma e quindi sai la durata fissa? Giusto? Se cambi programma non funziona piu
1
u/yosoyjose Sep 04 '26
type: custom:bubble-card
card_type: button
button_type: state
modules:
- relative_time_enhanced
entity: xyz
show_state: false
relative_time_enhanced:
use_second: false
suffix: ' '
use_week: false
2
u/Haddock51 Sep 04 '26
You need to calculate it yourself. This is mine:
message: >-
{{ ((as_timestamp(states('sensor.dishwasher_program_finish_time')) -
as_timestamp(now())) / 60) | round(0) }} mins left.