frontend
frontend copied to clipboard
Tile card not updating the "remaining" (time) when using timers
Checklist
- [X] I have updated to the latest available Home Assistant version.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
Describe the issue you are experiencing
After setting up a tile card for a "timer" in the dashboard, the "state content" attribute "remaining" never gets updated in the tile card. Clicking the tile card brings up a dialogue which displays the remaining just fine - and also updates it as time moves along.
Describe the behavior you expected
The remaining time should be updated in the tile card until the timer is up.
Steps to reproduce the issue
- Add a tile card to a dashboard
- Use a timer as the entity
- Select "remaining" in the "state content"
- Save
- Start the timer ...
What version of Home Assistant Core has the issue?
2023.11.2
What was the last working version of Home Assistant Core?
2023.11.2
In which browser are you experiencing the issue with?
Firefox 119.01
Which operating system are you using to run this browser?
macOS Sonoma 14.0
State of relevant entities
entity: timer.kuche_kochmodus
duration: 0:30:00
editable: true
restore: true
icon: mdi:timer
friendly_name: Küche: Kochmodus
Problem-relevant frontend configuration
type: vertical-stack
cards:
- features:
- type: light-brightness
- type: light-color-temp
type: tile
entity: light.hangelampe_kuche
icon: mdi:ceiling-light
name: Hängelampe
tap_action:
action: more-info
hide_state: true
- features:
- type: light-brightness
type: tile
show_entity_picture: false
vertical: false
entity: light.zigbee_tradfri_driver_03
icon: mdi:faucet
name: Küchenzeile
hide_state: true
- type: horizontal-stack
cards:
- type: tile
entity: sensor.zigbee_aqara_motion_03_device_temperature
name: Temperatur
color: accent
- type: tile
entity: timer.kuche_kochmodus
name: Kochmodus
state_content: remaining
- type: media-control
entity: media_player.wohnzimmer
Javascript errors shown in your browser console/inspector
No response
Additional information
I'll argue this isn't really a bug, but just a quirk of how the remaining
attribute works for timer, which is pretty unintuitive.
It is not an accurate count of the time remaining, as it only updates when the timer changes state (like changes from running to paused). It does not continually update as it counts down, as that would generate a lot of unnecessary recorder events.
So the tile card is correct in showing this attribute as it really exists in the state machine. Some other frontend cards (like entities) do generate a live countdown, but that's not the same thing as displaying the remaining
attribute.
One could ask for tile card to generate a similar countdown, but that's more of a feature request.
I understand your standpoint.
I think there are two ways to look at this: from the perspective of a user this looks like "bad design" as it doesn't act like the name and setting might imply. (Remember I am able to select "remaining" here and it doesn't do anything at all except displaying the "duration", but nothing else).
From a programmers perspective the solution itself works (although I only can image how the inner workings are - maybe it's "one solution fits all", which might be clean in itself, but takes casualities as the programming doesn't cover edge cases like "remaining"). Adding code (or recorder events, as you wrote) makes it more complicated, bloated and maybe error prone.
Keen to follow this as I'm using the tile card to monitor the timer state (and hopefully remaining time) but the remaining, as described, stays at the initial value as of the state change from Idle to Active. The workaround for now is I click in to the tile for more details and the remaining time is visible there.
I thought I would share that the Entities Card does show the remaining time for Timers when the state moves away from Idle:
Thank you. Good to know there are alternatives, yet I like a visual consistency thus I am using a lot of tile cards in my dashboards. Would be great to see a similar functionality (as in entity cards) here as well.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The issue is still unsolved