timer-bar-card icon indicating copy to clipboard operation
timer-bar-card copied to clipboard

Show progress or percentage

Open ausfas opened this issue 1 year ago • 6 comments

I absolutely love this card, despite the fact I have not been able to configure this so far. I wanted to use it as an entity to show progress of percentage that comes from the state of the sensor.dishwasher_progress as value e.g 80 (%). Since, you mentioned that for percentage use the bar card but unfortunate its not good aesthetically see below when I used height 10 image Is there a way I can use to show progress 0->100 % as this would be perfect replacement of my gauge card with simple an entity row image

ausfas avatar Feb 28 '23 09:02 ausfas

I'm not too familiar with Bosch Dishwashers, but are you using the Home Connect integration? It should have a sensor.dishwasher_remaining_program_time you can use with the card.

Showing a % completed next to the bar is a great idea. Would you be able to achieve what you wanted if I added an option to show the % complete instead of the time left in the timer.

I understand where you are coming from asking to use the card with a percentage input. However, I feel that diverges from the original spirit of a card for timers.

rianadon avatar Mar 01 '23 05:03 rianadon

  1. yes, I was using Home Connect Integration and sensor.dishwasher_remaining_program_time is working fine issue #36. Thanks :)
  2. Your solution is neater and cleaner, while the other bar graph card even if I use the height 10, there is unnecessary white space as the actual bar design was very thick. May be some CSS tweak might work or wish the owner sees your solution :) . What I was suggesting is not to change the scope but a hack that the state (which is the percentage) that changes as the time progresses could some how be captured. I don't know how but asking for your suggestion.
  3. The issue I'm having is to use it against the binary sensor when it tripped. I use one of these one to check if the garage door is open. It sends notification but with your card, I would like to start the timer when it trip from 'off' state to 'on' till its off (the duration I guess). So that I can see for how long it remained open. Here is the information of the sensor. image I tried this but it is not working
type: custom:timer-bar-card
entities:
  - binary_sensor.zone_9
active_state: 'on'
start_time:
  attribute: last_tripped_time
debug: true

ausfas avatar Mar 02 '23 09:03 ausfas

  1. yes, I was using Home Connect Integration and sensor.dishwasher_remaining_program_time is working fine issue Home Connect (BSH - Bosch/Siemens/Neff/Gagenau) Dishwasher #36. Thanks :)

Awesome to hear!

  1. Your solution is neater and cleaner, while the other bar graph card even if I use the height 10, there is unnecessary white space as the actual bar design was very thick. May be some CSS tweak might work or wish the owner sees your solution :) . What I was suggesting is not to change the scope but a hack that the state (which is the percentage) that changes as the time progresses could some how be captured. I don't know how but asking for your suggestion.

I think you are right—the code for parsing a percentage wouldn't be too much to add. What I worry about more are the other necessary features & documentation for making a good bar graph card. In addition for the option telling the card for parsing percentages, it's also going to need a "min" and "max" for dealing with non-percentage quantities, like the original bar card.

Then more challenging will be documenting these features while keeping them from distracting anyone trying to use the card as purely a timer.

I have been thinking about separating the "back end" (dealing with timer entity configuration & supporting every integration) from the "front end" (the display of the timer) of this card for some time. If I do this, a solution could be to make a separate timer bar card and bar card that share the same frontend but have different backends.

I'd probably do this if one of the newer timer cards has a need for supporting all the integrations this card supports so the backend could be used by more than just this project.

  1. The issue I'm having is to use it against the binary sensor when it tripped. I use one of these one to check if the garage door is open. It sends notification but with your card, I would like to start the timer when it trip from 'off' state to 'on' till its off (the duration I guess). So that I can see for how long it remained open. Here is the information of the sensor. image I tried this but it is not working
type: custom:timer-bar-card
entities:
  - binary_sensor.zone_9
active_state: 'on'
start_time:
  attribute: last_tripped_time
debug: true

A very creative use of the card 😁. A timer needs a time that it will finish, but in your case the timer should be able to go on in perpetuity.

You could give the card a very large fixed duration. However, this will show a countdown rather than a count-up. For a count-up, I recommend you use an automation like this example.

I love how much you'd like to use my card, but I'm not sure it's your best solution here.

rianadon avatar Mar 03 '23 00:03 rianadon

Hi, I love your card too and i would love to be able to use it to display the progression of my vaccum, which is only a percentage, from 0 to 100%.

bobzer avatar Nov 27 '23 23:11 bobzer

I would love to use the "progress bar" to show the remaining space on my NAS. I understand the component was developed with time duration in mind. But I was unable to find something suited for % that looks this nice.

LaurentVitalis avatar Dec 01 '23 21:12 LaurentVitalis

I'll have to add this sometime in the future. It's been requested a ton, and even displaying a timer in place of a percentage (for example some integrations only give you a duration and a % finished) is a use case this card should handle.

However, displaying & parsing these percentages would require a lot of changes to the card. I don't imagine myself having the time to do this soon.*

* Pull requests more than welcome!

rianadon avatar Dec 08 '23 00:12 rianadon