Is the remaining time attribute still not working on the timer entity? Just curious. I’ve been needing this for a long time but haven’t found a simple solution.
In my experience, Developer Tools always the remaining time attribute incorrectly equal to the duration
You can see the remaining time in lovelace with this:
- type: 'custom:button-card'
entity: switch.whatever
name: 'Whatever'
variables:
timer_var: "timer.whatever"
template:
- timer
And include this under: button_card_templates:
timer: # use with toggle
variables:
timer_var: "placeholder"
triggers_update: all
custom_fields:
desc:
card:
type: custom:button-card
entity: '[[[ return variables.timer_var ]]]'
show_name: false
show_icon: false
show_state: true
styles:
card:
- font-size: 12px
- box-shadow: none
state:
- color: >
[[[
if (states[ variables.timer_var ].state == 'idle')
return "white";
else
return "red";
]]]```