timer-bar-card
timer-bar-card copied to clipboard
Time is not refreshing when timer entity changes
Describe the bug When a timer is defined as a duration instead of an entity in the config, the time of the card is not refreshed when the timer entity changes duration. Refreshing the page updates the card time, but retains the elapsed time of the first timer duration.
- Toggle switch to turn on, timer start with 2h (7200sec) (Time remaining since switch turn on = Δt)
- Timer entity chages to 1h (3600sec)
- Card shows 2h - Δt
- Refresh browser
- Card shows 1h - Δt
- Card shows state on with no time remaining when 1h - Δt = 0
- Switch is turned off when the duration of the timer entity is 0 (1h after the timer has changed)
When the timer is set has the entity of the card, it behave has expected. The time of the card reset with the new value of the timer entity.
Might be related to issues #190 and #196
Your card configuration
type: custom:timer-bar-card
entity: switch.chime_silence
invert: true
duration:
entity: timer.chime_timer
attribute: duration
text_width: 4em
mushroom:
color: amber
Debug information When the switch is turned on with the timer set at 2h:
State: on (state mode = active)
Mode: active (explicit; guess mode produces N/A)
Duration: 7200 second
Time remaining: 7190.453
Counter: 7190.453
Attr: {"icon":"mdi:volume-off","friendly_name":"Chime Silence"}
When the timer entity is change to 1h and after refreshing the browser: Time as changed but time remaining and counter were not set to the new duration.
State: on (state mode = active)
Mode: active (explicit; guess mode produces N/A)
Duration: 3600 second
Time remaining: 3551.717
Counter: 3551.717
Attr: {"icon":"mdi:volume-off","friendly_name":"Chime Silence"}