I am trying to set up a conditional card that only shows up if my TV timer script is running and shows how many minutes are left on the timer. Everything is working perfectly fine, except the “last-triggered” attribute unhelpfully shows the full date and time of the last trigger ( think November 21, 2023, 8:09:17). Most infuriating is that when you actually click on the script entity, it shows the “last_triggered” attribute in the “minutes ago” format instead of this monstrosity that shows up on the dashboard.
Anybody have any idea if it is possible to convert the unit so it shows how many minutes ago this happened? I tried various workarounds involving creating new and different kinds of helpers, but no luck so far.
Code:
cards:
- type: conditional
conditions:- condition: state
entity: script.tv_timer_30m
state: ‘on’
card:
type: entity
entity: script.tv_timer_30m
name: TV Timer Is On
attribute: last_triggered
- condition: state