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

Add show_emtpy option

Open PablaV opened this issue 2 years ago • 3 comments

Is it possible to add a show_empty option? I use the progress bar card to show which zones of OpenSprinkler are watering, but would like the card to show up even when it's empty. Basically the exact same option/behaviour as the filter_card default in HA.

PablaV avatar Jul 01 '22 17:07 PablaV

I'm a bit confused what you are asking. By default the card should always show the entity you configure it for. And if you provide a title and use filter: true, the title should still show even when there are no entities to display. Could you explain more what you're looking for?

Also since you are using OpenSprinkler, I must plug my OpenSprinkler card in case you haven't seen it :)

rianadon avatar Jul 09 '22 17:07 rianadon

Maybe PablaV means a timer bar that does not totally disappear when remaining time = 0

Hannah-Bee avatar Jul 15 '22 20:07 Hannah-Bee

What I meant was to have some sort of text saying "No Zones Watering" when all zones are off so it just doesn't show blank. Hope that makes sense!

PablaV avatar Jul 15 '22 20:07 PablaV

Thank you @PablaV! I understand better now what you're suggesting.

I'm imagining a show_empty option would take in a string of text to display if there are no entities to display? So in your case you could say show_empty: "No Zones Watering"?

rianadon avatar Dec 13 '22 22:12 rianadon

Yes exactly what I mean!

PablaV avatar Dec 13 '22 22:12 PablaV

Great! I've pushed the option in version 1.21.

rianadon avatar Dec 13 '22 22:12 rianadon