From 18869c6e12cd56d4b480acd46c9b69e0b008a18e Mon Sep 17 00:00:00 2001 From: lolodomo Date: Wed, 11 Dec 2024 20:16:28 +0100 Subject: [PATCH] [freeboxos] Add missing thing actions for active player (#17877) Fix #17874 Signed-off-by: Laurent Garnier --- .../internal/action/ActivePlayerActions.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/action/ActivePlayerActions.java b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/action/ActivePlayerActions.java index 5907de3807643..d037df8d8c7f2 100644 --- a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/action/ActivePlayerActions.java +++ b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/action/ActivePlayerActions.java @@ -15,6 +15,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault; import org.openhab.binding.freeboxos.internal.handler.ActivePlayerHandler; import org.openhab.binding.freeboxos.internal.handler.PlayerHandler; +import org.openhab.core.automation.annotation.ActionInput; import org.openhab.core.automation.annotation.RuleAction; import org.openhab.core.thing.binding.ThingActions; import org.openhab.core.thing.binding.ThingActionsScope; @@ -52,4 +53,30 @@ public static void rebootPlayer(ThingActions actions) { throw new IllegalArgumentException("actions parameter is not an ActivePlayerActions class."); } } + + @Override + @RuleAction(label = "@text/action.sendKey.label", description = "@text/action.sendKey.description") + public void sendKey(@ActionInput(name = "key", label = "@text/action.input.key.label") String key) { + super.sendKey(key); + } + + @Override + @RuleAction(label = "@text/action.sendLongKey.label", description = "@text/action.sendLongKey.description") + public void sendLongKey(@ActionInput(name = "key", label = "@text/action.input.key.label") String key) { + super.sendLongKey(key); + } + + @Override + @RuleAction(label = "@text/action.sendMultipleKeys.label", description = "@text/action.sendMultipleKeys.description") + public void sendMultipleKeys( + @ActionInput(name = "keys", label = "@text/action.sendMultipleKeys.input.keys.label", description = "@text/action.sendMultipleKeys.input.keys.description") String keys) { + super.sendMultipleKeys(keys); + } + + @Override + @RuleAction(label = "@text/action.sendKeyRepeat.label", description = "@text/action.sendKeyRepeat.description") + public void sendKeyRepeat(@ActionInput(name = "key", label = "@text/action.input.key.label") String key, + @ActionInput(name = "count", label = "@text/action.sendKeyRepeat.input.count.label", description = "@text/action.sendKeyRepeat.input.count.description") int count) { + super.sendKeyRepeat(key, count); + } }