timer-bar-card
timer-bar-card copied to clipboard
Colorized segments - as indicator for total timer with added up runtimes
I use a total timer, which also adds up individual run times. (several lawn sprinklers with individual runtimes - one combined total timer)
Would it be possible to adjust the timer in the following way:
- Within a timer you create several segments.
- each segment has a start and end value
- Each segment can be assigned an individual color.
- Undefined areas have the default color.
Somthing like:
segments:
# Segment 1
- segment:
- start: "00:00:00"
- end: "00:04:00"
- color: "#0066cc"
# Segment 2
- segment:
- start: "00:04:00"
- end: "00:09:00"
- color: "#0099ff"
# Segment 3 not defined --> 00:09 till end with default colour
Currently: 3 runtimes (4, 5 and 6 minutes) --> 15 minutes total timer - all in blue
Feature request: 3 runtimes (4, 5 and 6 minutes) --> 15 minutes total timer 00:00 - 00:04 ---> sprinkler 3 in dark blue (or color value x) 00:04 - 00:09 ---> sprinkler 2 in blue (or color value y) 00:09 - 00:15 ---> sprinkler 1 in light blue (or color value z)
This way you could comfortably see already during the runtime in which stage you are.
Ahahah I thought about this when designing my OpenSprinkler card. This is where I left off on the train of thought of multiple-segments-per-bar.
![image](https://user-images.githubusercontent.com/18223213/178170931-b80655f1-5133-4d58-93a5-9b5d4275d2dd.png)
Ultimately I decided this way was much more complex and challenging than it was worth, so I nixed it.
However, it seems like what you're asking for is much simpler as this is simply a change to the progress bar's look rather than a progress bar that keeps track of multiple entities. It's a great idea, but I don't think I'll have time to implement this anytime soon.
I'm marking this as help wanted in case someone sees this issue and wants to work on a PR. Having multiple colored bars is also a thing that would help #29, another issue I've been putting off addressing.
I'm glad you like the idea. Of course, I understand if you currently have little time for implementation. Nevertheless, I would of course be happy if you could maybe schedule it at some point - if no helper can be found.
About your original idea - wouldn't it be easier to put several timers in a row instead of building one big intelligent timer that looks after several entities?
Total timer 100% width = timer 1 (entity x , width 40%)
timer 2 (entity y , width 15%)
timer 3 (entity z , width 45%).
All behind each other in a row. When the first timer expires, the next one starts. Visually it would be a large timer with segments.