Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When changing resolution to minutes, they should be rounded down #154

Open
kr0ner opened this issue Jul 24, 2024 · 1 comment
Open

When changing resolution to minutes, they should be rounded down #154

kr0ner opened this issue Jul 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@kr0ner
Copy link

kr0ner commented Jul 24, 2024

Describe the bug
image

If the resolution is not set, it would display 1:59:59
when set to "minutes", it rounds up to 60 which looks a bit weird

Your card configuration

type: custom:timer-bar-card
entity: switch.esp32_poe_technik_kuehlung_hk1
name: Kühlung HK1
duration:
  fixed: '02:00:00'
invert: true
bar_width: 60%
icon: mdi:snowflake
resolution: minutes
mushroom:
  layout: horizontal
  secondary_info: none
...
@rianadon
Copy link
Owner

rianadon commented Sep 9, 2024

Oh, how odd. The 1:60 should be 2:00.

The rounding up is an intentional choice. I find it weird to have the timer show 0 when there are still a 59 seconds to go, so I round up to 1 minute. To be consistent, every time is rounded up.

@rianadon rianadon added the bug Something isn't working label Sep 9, 2024
@rianadon rianadon self-assigned this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants