Skip to content

Commit

Permalink
[u-v] Fix @ActionOutput annotations (#17670)
Browse files Browse the repository at this point in the history
Related to #17636

Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo authored Oct 30, 2024
1 parent 276254d commit eae43f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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) {
Expand All @@ -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",
Expand Down Expand Up @@ -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());
}

Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit eae43f2

Please sign in to comment.