Skip to content

Commit

Permalink
[freeboxos] Add missing thing actions for active player (openhab#17877)
Browse files Browse the repository at this point in the history
Fix openhab#17874

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored and matchews committed Dec 16, 2024
1 parent 8a3ea65 commit 18869c6
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}

0 comments on commit 18869c6

Please sign in to comment.