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

Hours showing with decimal, minutes empty in time picker #779

Open
2 tasks done
otoivanen opened this issue Dec 26, 2023 · 6 comments
Open
2 tasks done

Hours showing with decimal, minutes empty in time picker #779

otoivanen opened this issue Dec 26, 2023 · 6 comments
Labels

Comments

@otoivanen
Copy link

Checklist

  • I checked for similar existing issues (both open and closed) before posting.
  • I will participate in further discussion about this issue and can help by testing (if requested).

Card Version

v3.2.12

Component Version

No response

Bug description

When adding a schedule, the time picker shows minutes as decimals in Hour -section and the minutes stay empty.

When increasing minutes from the up and down arrows, only decimals change in hours -section (and the decimals don't fit in the area if value is longer than two digits).

kuva

When googling found only one similar case which was also Finnish user. Maybe localization related?

Steps to reproduce

Not sure how to reproduce, this is how it has been since installation on Finnish setup.

Additional info

No response

@otoivanen otoivanen added the bug Something isn't working label Dec 26, 2023
@otoivanen
Copy link
Author

Just noticed, that if I select the before/after sunrise mode, then minutes are showing correctly when setting the offset. Not working when giving exact time.

@otoivanen
Copy link
Author

Tried also changing locale to english in Chrome, but only the character changed from comma to dot in the hour picker.

@nielsfaber
Copy link
Owner

Could you try setting the HA language to English and see if the issue disappears?
Perhaps it is related to Finnish locale.

@otoivanen
Copy link
Author

Could you try setting the HA language to English and see if the issue disappears?
Perhaps it is related to Finnish locale.

Yes, I did some investogation and the reason was that HA has 00.00 time format in Finnish, but 00:00 in all other nordic countries.

I checked the card's javascript, and modified the getTimeParts function which splits on ":" - replaced it with "." and now the picker works! Just testing if scheduling also works as supposed to.

Maybe the source could be updated to split time parts also on "."?

@nielsfaber
Copy link
Owner

Looks like you did all the work, thanks!
I was not aware of this different notation. This is definitely something that should be addressed in the code.
I will put it on my to-do list.

@Christoffer-da
Copy link

I have the same error with Danish locale-settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants