It won’t a template can’t update once per second without using a timepattern trigger, which can only be done in a template sensor. The template you’re using will only update on the minute.
because it doesn’t update. It’s only available when running and it just tells you the duration of the current time. You can change the duration and it won’t affect the current run. So remaining is the attribute that you use to get the ‘current duration’.
well, it’s a little more complicated than that. The template card has direct access to states via JS. So contacting them will do little to nothing as you’re getting out the raw state from the state machine. Not to mention, he’s been MIA for some time IIRC.
Full disclosure: I know nothing about that particular custom card.
My guess is that the Entities card calculates the remaining time exclusively in the frontend. I would imagine that any card can be designed to replicate that behavior; it only requires the finishes_at value and the current time (with one-second resolution). Again, just a guess because I don’t currently have the time to inspect the card’s code.
It uses templates, but with javascript. It just outputs the result of the template. He’s most likely grabbing the state from the state machine. I.e. he’d have to build the HTML that displays the information properly but he most likely doesn’t have access to it in the templating machine built into the card.
Ah! Understood. It’s a generalist and not really within its mission to give any particular entity special handling (like “show timer’s remaining time”).
right, you probably can do it though if you had access to the frontend toolkit within the template itself. Not sure if that’s a thing for that card or not.