From 0c8f90aedd9861e853de565ef31508d0d3615a1a Mon Sep 17 00:00:00 2001 From: lolodomo Date: Wed, 30 Oct 2024 09:53:58 +0100 Subject: [PATCH] [u-v] Fix @ActionOutput annotations (#17670) Related to #17636 Signed-off-by: Laurent Garnier --- .../unifi/internal/action/UniFiSiteActions.java | 12 ++++++------ .../binding/velux/internal/action/VeluxActions.java | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/action/UniFiSiteActions.java b/bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/action/UniFiSiteActions.java index 3635b3cf1fde5..7b3b306f64f5a 100644 --- a/bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/action/UniFiSiteActions.java +++ b/bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/action/UniFiSiteActions.java @@ -59,7 +59,7 @@ public class UniFiSiteActions implements ThingActions { private final Gson gson = new Gson(); @RuleAction(label = "@text/action.unifi.generateVouchers.label", description = "@text/action.unifi.generateVouchers.description") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean generateVoucher( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean generateVoucher( /* @formatter:off */ @ActionInput(name = "expire", label = "@text/channel-type.config.unifi.guestVouchersGenerate.voucherExpiration.label", @@ -81,7 +81,7 @@ public class UniFiSiteActions implements ThingActions { } @RuleAction(label = "@text/action.unifi.generateVouchers.label", description = "@text/action.unifi.generateVouchers.description") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean generateVouchers( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean generateVouchers( /* @formatter:off */ @ActionInput(name = "count", label = "@text/channel-type.config.unifi.guestVouchersGenerate.voucherCount.label", @@ -165,7 +165,7 @@ public static boolean generateVouchers(ThingActions actions, @Nullable Integer c } @RuleAction(label = "@text/action.unifi.revokeVouchers.label", description = "@text/action.unifi.revokeVouchers.description") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean revokeVoucher( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean revokeVoucher( /* @formatter:off */ @ActionInput(name = "voucherCodes", label = "@text/action.unifi.vouchersInputVoucherCodes.label", description = "@text/action.unifi.vouchersInputVoucherCodes.description") String voucherCode) { @@ -174,7 +174,7 @@ public static boolean generateVouchers(ThingActions actions, @Nullable Integer c } @RuleAction(label = "@text/action.unifi.revokeVouchers.label", description = "@text/action.unifi.revokeVouchers.description") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean revokeVouchers( + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean revokeVouchers( /* @formatter:off */ @ActionInput(name = "voucherCodes", label = "@text/action.unifi.vouchersInputVoucherCodes.label", description = "@text/action.unifi.vouchersInputVoucherCodes.description", @@ -210,7 +210,7 @@ public static boolean generateVouchers(ThingActions actions, @Nullable Integer c } @RuleAction(label = "@text/action.unifi.revokeAllVouchers.label", description = "@text/action.unifi.revokeAllVouchers.description") - public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean revokeAllVouchers() { + public @ActionOutput(label = "Success", type = "java.lang.Boolean") Boolean revokeAllVouchers() { return revokeVouchers(List.of()); } @@ -231,7 +231,7 @@ public static boolean revokeVouchers(ThingActions actions) { } @RuleAction(label = "@text/action.unifi.listVouchers.label", description = "@text/action.unifi.listVouchers.description") - public @ActionOutput(name = "vouchers", type = "java.lang.String") String listVouchers() { + public @ActionOutput(label = "Vouchers", type = "java.lang.String") String listVouchers() { UniFiSiteThingHandler handler = this.handler; if (handler == null) { logger.debug("Could not list guest vouchers, site thing handler not set"); diff --git a/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/action/VeluxActions.java b/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/action/VeluxActions.java index 3cbacdf8fcd11..92461e669e19b 100644 --- a/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/action/VeluxActions.java +++ b/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/action/VeluxActions.java @@ -55,7 +55,7 @@ public void setThingHandler(@Nullable ThingHandler handler) { } @RuleAction(label = "@text/action.reboot.label", description = "@text/action.reboot.descr") - public @ActionOutput(name = "running", type = "java.lang.Boolean", label = "@text/action.run.label", description = "@text/action.run.descr") Boolean rebootBridge() + public @ActionOutput(type = "java.lang.Boolean", label = "@text/action.run.label", description = "@text/action.run.descr") Boolean rebootBridge() throws IllegalStateException { logger.trace("rebootBridge(): action called"); VeluxBridgeHandler bridgeHandler = this.bridgeHandler; @@ -66,7 +66,7 @@ public void setThingHandler(@Nullable ThingHandler handler) { } @RuleAction(label = "@text/action.moveRelative.label", description = "@text/action.moveRelative.descr") - public @ActionOutput(name = "running", type = "java.lang.Boolean", label = "@text/action.run.label", description = "@text/action.run.descr") Boolean moveRelative( + public @ActionOutput(type = "java.lang.Boolean", label = "@text/action.run.label", description = "@text/action.run.descr") Boolean moveRelative( @ActionInput(name = "nodeId", label = "@text/action.node.label", description = "@text/action.node.descr") @Nullable String nodeId, @ActionInput(name = "relativePercent", label = "@text/action.relative.label", description = "@text/action.relative.descr") @Nullable String relativePercent) throws NumberFormatException, IllegalStateException, IllegalArgumentException { @@ -130,7 +130,7 @@ public static Boolean moveRelative(@Nullable ThingActions actions, @Nullable Str } @RuleAction(label = "@text/action.moveMainAndVane.label", description = "@text/action.moveMainAndVane.descr") - public @ActionOutput(name = "running", type = "java.lang.Boolean", label = "@text/action.run.label", description = "@text/action.run.descr") Boolean moveMainAndVane( + public @ActionOutput(type = "java.lang.Boolean", label = "@text/action.run.label", description = "@text/action.run.descr") Boolean moveMainAndVane( @ActionInput(name = "thingName", label = "@text/action.thing.label", description = "@text/action.thing.descr") @Nullable String thingName, @ActionInput(name = "mainPercent", label = "@text/action.main.label", description = "@text/action.main.descr") @Nullable Integer mainPercent, @ActionInput(name = "vanePercent", label = "@text/action.vane.label", description = "@text/action.vane.descr") @Nullable Integer vanePercent)