Skip to content

Add configuration option for 2 digit hours#287

Open
oyvindwe wants to merge 1 commit intoalexpfau:mainfrom
oyvindwe:config-leading-0
Open

Add configuration option for 2 digit hours#287
oyvindwe wants to merge 1 commit intoalexpfau:mainfrom
oyvindwe:config-leading-0

Conversation

@oyvindwe
Copy link

@oyvindwe oyvindwe commented Oct 8, 2025

Description

Add configuration option for 2 digit hours.

Also corrected doc strings in nearby code. Let me know if you prefer this to be refactored to a separate PR.

Related Issue

Based on feedback in PR #240

Motivation and Context

2 digit hours is a common when using 24 hours time format. See e.g. ISO 8601 or Google Calendar UI.

For flexibility (and avoding complex logic in configuration), this is also offered for 12 hours time format.

How Has This Been Tested

Tested by tweaking the time format configuration in the UI. Both variants work for system, 12h, and 24h time formats.

Types of changes

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 🌎 Translation (addition or update for a language)
  • ⚙️ Tech (code style improvement, performance improvement or dependencies update)
  • 📚 Documentation (fix or addition to documentation)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have linted and formatted my code (npm run lint and npm run format)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have tested the change in my local Home Assistant instance.
  • I have followed the translation guidelines if I'm adding or updating a translation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant