mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[a-d] Fix @ActionOutput annotations (#17644)
Related to #17636 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
abe819978f
commit
cdf05543bd
@ -66,7 +66,7 @@ public class AstroActions implements ThingActions {
|
||||
}
|
||||
|
||||
@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(
|
||||
@ActionInput(name = "date", label = "Date", required = false, description = "Considered date") @Nullable ZonedDateTime date) {
|
||||
logger.debug("Astro action 'getAzimuth' called");
|
||||
AstroThingHandler theHandler = this.handler;
|
||||
@ -79,7 +79,7 @@ public class AstroActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "get the elevation", description = "Get the elevation for a given time.")
|
||||
public @Nullable @ActionOutput(name = "getElevation", label = "Elevation", type = "org.openhab.core.library.types.QuantityType<javax.measure.quantity.Angle>") QuantityType<Angle> getElevation(
|
||||
public @Nullable @ActionOutput(name = "result", label = "Elevation", type = "org.openhab.core.library.types.QuantityType<javax.measure.quantity.Angle>") QuantityType<Angle> getElevation(
|
||||
@ActionInput(name = "date", label = "Date", required = false, description = "Considered date") @Nullable ZonedDateTime date) {
|
||||
logger.debug("Astro action 'getElevation' called");
|
||||
AstroThingHandler theHandler = this.handler;
|
||||
@ -92,7 +92,7 @@ public class AstroActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "get the total sun radiation", description = "Get the total sun radiation for a given time.")
|
||||
public @Nullable @ActionOutput(name = "getTotalRadiation", label = "Total Radiation", type = "org.openhab.core.library.types.QuantityType<org.openhab.core.library.dimension.Intensity>") QuantityType<Intensity> getTotalRadiation(
|
||||
public @Nullable @ActionOutput(name = "result", label = "Total Radiation", type = "org.openhab.core.library.types.QuantityType<org.openhab.core.library.dimension.Intensity>") QuantityType<Intensity> getTotalRadiation(
|
||||
@ActionInput(name = "date", label = "Date", required = false, description = "Considered date") @Nullable ZonedDateTime date) {
|
||||
logger.debug("Astro action 'getTotalRadiation' called");
|
||||
AstroThingHandler theHandler = this.handler;
|
||||
@ -110,7 +110,7 @@ public class AstroActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "get the date time of a sun event", description = "Get the date time of a sun event.")
|
||||
public @Nullable @ActionOutput(name = "getEventTime", type = "java.time.ZonedDateTime") ZonedDateTime getEventTime(
|
||||
public @Nullable @ActionOutput(name = "result", label = "Event Time", type = "java.time.ZonedDateTime") ZonedDateTime getEventTime(
|
||||
@ActionInput(name = "phaseName", label = "Phase", required = true, description = "Requested phase") String phaseName,
|
||||
@ActionInput(name = "date", label = "Date", required = false, description = "Considered date") @Nullable ZonedDateTime date,
|
||||
@ActionInput(name = "moment", label = "Moment", required = false, defaultValue = "START", description = "Either START or END") @Nullable String moment) {
|
||||
|
@ -41,7 +41,7 @@ public class ChromecastActions implements ThingActions {
|
||||
private @Nullable ChromecastHandler handler;
|
||||
|
||||
@RuleAction(label = "@text/playURLActionLabel", description = "@text/playURLActionDescription")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean playURL(
|
||||
public @ActionOutput(name = "result", label = "Success", type = "java.lang.Boolean") Boolean playURL(
|
||||
@ActionInput(name = "url") @Nullable String url) {
|
||||
if (url == null) {
|
||||
logger.warn("Cannot Play as URL is missing.");
|
||||
@ -58,7 +58,7 @@ public class ChromecastActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "@text/playURLTypeActionLabel", description = "@text/playURLTypeActionDescription")
|
||||
public @ActionOutput(name = "success", type = "java.lang.Boolean") Boolean playURL(
|
||||
public @ActionOutput(name = "result", label = "Success", type = "java.lang.Boolean") Boolean playURL(
|
||||
@ActionInput(name = "url") @Nullable String url,
|
||||
@ActionInput(name = "mediaType") @Nullable String mediaType) {
|
||||
if (url == null) {
|
||||
|
@ -27,6 +27,7 @@ import org.openhab.binding.deconz.internal.dto.NewSceneResponse;
|
||||
import org.openhab.binding.deconz.internal.handler.GroupThingHandler;
|
||||
import org.openhab.core.automation.annotation.ActionInput;
|
||||
import org.openhab.core.automation.annotation.ActionOutput;
|
||||
import org.openhab.core.automation.annotation.ActionOutputs;
|
||||
import org.openhab.core.automation.annotation.RuleAction;
|
||||
import org.openhab.core.thing.binding.ThingActions;
|
||||
import org.openhab.core.thing.binding.ThingActionsScope;
|
||||
@ -59,8 +60,9 @@ public class GroupActions implements ThingActions {
|
||||
private @Nullable GroupThingHandler handler;
|
||||
|
||||
@RuleAction(label = "@text/action.create-scene.label", description = "@text/action.create-scene.description")
|
||||
public @ActionOutput(name = NEW_SCENE_ID_OUTPUT, type = "java.lang.Integer") Map<String, Object> createScene(
|
||||
@ActionInput(name = "name", label = "@text/action.create-scene.name.label", description = "@text/action.create-scene.name.description") @Nullable String name) {
|
||||
public @ActionOutputs({
|
||||
@ActionOutput(name = NEW_SCENE_ID_OUTPUT, label = "Scene Id", type = "java.lang.Integer") }) Map<String, Object> createScene(
|
||||
@ActionInput(name = "name", label = "@text/action.create-scene.name.label", description = "@text/action.create-scene.name.description") @Nullable String name) {
|
||||
GroupThingHandler handler = this.handler;
|
||||
|
||||
if (handler == null) {
|
||||
|
@ -85,7 +85,7 @@ public class DoorbirdActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "get the ring time limit", description = "Get the value of RING_TIME_LIMIT.")
|
||||
public @ActionOutput(name = "getRingTimeLimit", type = "java.lang.String") String getRingTimeLimit() {
|
||||
public @ActionOutput(name = "result", label = "Ring Time Limit", type = "java.lang.String") String getRingTimeLimit() {
|
||||
logger.debug("Doorbird action 'getRingTimeLimit' called");
|
||||
DoorbellHandler handler = this.handler;
|
||||
if (handler != null) {
|
||||
@ -101,7 +101,7 @@ public class DoorbirdActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "get the call time limit", description = "Get the value of CALL_TIME_LIMIT.")
|
||||
public @ActionOutput(name = "getCallTimeLimit", type = "java.lang.String") String getCallTimeLimit() {
|
||||
public @ActionOutput(name = "result", label = "Call Time Limit", type = "java.lang.String") String getCallTimeLimit() {
|
||||
logger.debug("Doorbird action 'getCallTimeLimit' called");
|
||||
DoorbellHandler handler = this.handler;
|
||||
if (handler != null) {
|
||||
@ -117,7 +117,7 @@ public class DoorbirdActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "get the last error code", description = "Get the value of LASTERRORCODE.")
|
||||
public @ActionOutput(name = "getLastErrorCode", type = "java.lang.String") String getLastErrorCode() {
|
||||
public @ActionOutput(name = "result", label = "Last Error Code", type = "java.lang.String") String getLastErrorCode() {
|
||||
logger.debug("Doorbird action 'getLastErrorCode' called");
|
||||
DoorbellHandler handler = this.handler;
|
||||
if (handler != null) {
|
||||
@ -133,7 +133,7 @@ public class DoorbirdActions implements ThingActions {
|
||||
}
|
||||
|
||||
@RuleAction(label = "get the last error text", description = "Get the value of LASTERRORTEXT.")
|
||||
public @ActionOutput(name = "getLastErrorText", type = "java.lang.String") String getLastErrorText() {
|
||||
public @ActionOutput(name = "result", label = "Last Error Text", type = "java.lang.String") String getLastErrorText() {
|
||||
logger.debug("Doorbird action 'getLastErrorText' called");
|
||||
DoorbellHandler handler = this.handler;
|
||||
if (handler != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user