Bubble cards and timers

Hi, I’m still pretty new to home assistant but I’ve been oplaying around with a few things and getting to grips.

I’ve got an electric blanket set up and working fine in home assistant, I have a bubble card pop-up that contains (amongst other things) the a button to turn the blanket on and off. I’ve successfully created a timer helper and an automation such that when the blanket is turned on, it automatically switches off once the timer has finished.

One thing I’m struggling with is showing the time remaining in the bubble card. If i add the timer sensor as a sub-button I can see if it’s active or idle, what the starting duration was, but not a simple count down.

I have created a template sensor as follows, that at least shows the “On until hh:mm” when the timer is active.

{% if is_state('timer.blanket_timer', 'active') %}
  On until {{ as_datetime(state_attr('timer.blanket_timer', 'finishes_at')).strftime('%I:%M %p') }}
{% else %}
  Off
{% endif %}

I can then add this as a sub-button, see example below (the button is normally orange when on).

image

However, this then loses the ability to pause/cancel the timer when clicking on the sub-button.

Ideally, what I’d like to acheive is to have the “On until…”, or time remaining, displayed below the word “Left” and to have a sub-button on the right with a timer icon that would allow a custom timer to be set (instead of the default set in the helper) and/or allow pause/cancelling the existing timer if active.

Any help/advice for a noob would be much appreciated.