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

[automation] ActionInputsHelper: Enable seconds for time & datetime #4436

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

florian-h05
Copy link
Contributor

By setting the step size to 1 for time and datetime, seconds are enabled in the UI.

Refs openhab/openhab-webui#2848.
Discussion in openhab/openhab-webui#2847 (comment)

@florian-h05
Copy link
Contributor Author

Once this is merged I will improve Instant and ZonedDateTime support to have the UI display it's dialog and not only a text box.

@florian-h05
Copy link
Contributor Author

@openhab/core-maintainers
Can you please have a look at these 15 changed lines (where 6 are unit tests) as well as #4438 so we can finish work on the Thing actions before the next milestone and test it in the snapshots before the milestone?

@@ -148,10 +151,12 @@ public ConfigDescriptionParameter mapActionInputToConfigDescriptionParameter(Inp
break;
case "java.time.LocalTime":
context = "time";
step = BigDecimal.ONE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does one in this context mean? one second?

Copy link
Contributor Author

@florian-h05 florian-h05 Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly.
The step size for datetime and time contexts defaults to 60 seconds, setting it to 1 second enables them to display seconds as well.

For reference: openhab/openhab-webui#2848.

@J-N-K J-N-K added the enhancement An enhancement or new feature of the Core label Nov 6, 2024
@J-N-K J-N-K added this to the 4.3 milestone Nov 6, 2024
@J-N-K J-N-K merged commit a31e837 into openhab:main Nov 6, 2024
5 checks passed
@florian-h05 florian-h05 deleted the actioninput-date-time-seconds branch November 6, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants