[freeboxos] Add missing thing actions for active player (#17877)

Fix #17874

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2024-12-11 20:16:28 +01:00 committed by GitHub
parent 9b4ee482ab
commit 2a58b8ed9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@ package org.openhab.binding.freeboxos.internal.action;
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 class ActivePlayerActions extends PlayerActions {
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);
}
}