timer-bar-card
timer-bar-card copied to clipboard
Use a progress attribute/entity to draw the progress bar
I have a Bosch dishwasher (via Home Connect) that provides an operation state and an ending time (although the entity is labeled "remaining program time" which obviously seems to be wrong) as information for the program operation. Additionally it provides an entity containing the progress as percentage value.
My request would be to give an option to use such progress entity or attribute for calculating/drawing the progress bar because this might be more reliable than computing the start time from the last changed timestamp of the main entity's state.
Maybe this request is somehow related to issue #73 but I'm not sure.
Hello, I think you can find a solution here: https://github.com/rianadon/timer-bar-card/issues/36
Yes, I'm aware of this solution (and it's working). It's just a proposal for an extension because I thought that it's maybe more straightforward to use an existing "progress" value to draw the bar instead of calculating the progress value from other attributes in that case. I don't know if there are any drawbacks of such an approach.
I think I understand your idea now. ^^
Maybe you safe a little bit of cpu? But I am not sure about that.
You might be right that it could be easier to configure the card based off of the progress value and the ending time.
My request would be to give an option to use such progress entity or attribute for calculating/drawing the progress bar because this might be more reliable than computing the start time from the last changed timestamp of the main entity's state.
However, I'm not sure this would generally be true, since the progress value would be an integer percentage from 0-100, which is not as precise as a timestamp that has a resolution of seconds. I wouldn't be able to use the percentage to calculate an accurate estimate of the time remaining.
And yes sadly using the last changed timestamp is not the most reliable. If Home Assistant restarts during your timer or if the appliance is paused (is that a thing?), then you will have incorrect values. However, that's probably best solved by the integration providing an attribute for the start time.
However, I'm not sure this would generally be true, since the progress value would be an integer percentage from 0-100, which is not as precise as a timestamp that has a resolution of seconds. I wouldn't be able to use the percentage to calculate an accurate estimate of the time remaining.
Yes, I agree. Therefore I proposed to have this as an option so everybody could decide on his own if the percentage value should be used or some other value like the last changed attribute. I think for some use cases like e.g., the progress of a dishwasher, an integer based percentage value would be accurate enough.
And yes sadly using the last changed timestamp is not the most reliable. If Home Assistant restarts during your timer or if the appliance is paused (is that a thing?), then you will have incorrect values.
Yes, I think pausing would be a valid use case for a dishwasher or washing machine.