[u-v] Fix @ActionOutput annotations (#17670)

Related to #17636

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2024-10-30 09:53:58 +01:00 committed by GitHub
parent 276254de70
commit eae43f26c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 9 deletions

View File

@ -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 class UniFiSiteActions implements ThingActions {
}
@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 class UniFiSiteActions implements ThingActions {
}
@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 class UniFiSiteActions implements ThingActions {
}
@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 class UniFiSiteActions implements ThingActions {
}
@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");

View File

@ -55,7 +55,7 @@ public class VeluxActions implements ThingActions {
}
@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 class VeluxActions implements ThingActions {
}
@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 class VeluxActions implements ThingActions {
}
@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)