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

[a-d] Fix @ActionOutput annotations #17644

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

lolodomo
Copy link
Contributor

Related to #17636

Related to openhab#17636

Signed-off-by: Laurent Garnier <[email protected]>

Deconz
@lolodomo lolodomo requested a review from J-N-K as a code owner October 28, 2024 00:27
@lolodomo lolodomo changed the title [astro/chromecast/doorbird] Fix @ActionOutput annotations [a-d] Fix @ActionOutput annotations Oct 28, 2024
Copy link
Contributor

@mhilbush mhilbush left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thanks LGTM

@lsiepel lsiepel merged commit cdf0554 into openhab:main Oct 28, 2024
5 checks passed
@lsiepel lsiepel added this to the 4.3 milestone Oct 28, 2024
@lolodomo lolodomo deleted the fix_actionoutput_1 branch October 28, 2024 07:47
@@ -66,7 +66,7 @@ public void setThingHandler(@Nullable ThingHandler handler) {
}

@RuleAction(label = "get the azimuth", description = "Get the azimuth for a given time.")
public @Nullable @ActionOutput(name = "getAzimuth", label = "Azimuth", type = "org.openhab.core.library.types.QuantityType<javax.measure.quantity.Angle>") QuantityType<Angle> getAzimuth(
public @Nullable @ActionOutput(name = "result", label = "Azimuth", type = "org.openhab.core.library.types.QuantityType<javax.measure.quantity.Angle>") QuantityType<Angle> getAzimuth(
Copy link
Contributor

Choose a reason for hiding this comment

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

@lolodomo Just FYI, it should be possible to leave out the name as it now defaults to result inside the core code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lsiepel @florian-h05 : your suggestion is to set name parameters or not ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to not set names for actions with a single output.

Copy link
Contributor

@lsiepel lsiepel Oct 28, 2024

Choose a reason for hiding this comment

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

Maybe a little redundant, but also less error prone to have them explicitly set. I'm fine with either one, as long as we are consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's choose to not include name.

KaaNee pushed a commit to KaaNee/openhab-addons that referenced this pull request Nov 8, 2024
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.

4 participants