Help needed for action Handler

Hello ,
i build currently a new binding and want to implement a Action handler Class

package org.openhab.binding.yioremote.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.smarthome.core.thing.binding.ThingActions;
import org.eclipse.smarthome.core.thing.binding.ThingActionsScope;
import org.eclipse.smarthome.core.thing.binding.ThingHandler;
import org.openhab.core.automation.annotation.ActionInput;
import org.openhab.core.automation.annotation.RuleAction;

@ThingActionsScope(name = "yioremote") // Your bindings id is usually the scope
public class YIOremoteDockActions implements ThingActions {
    private @Nullable YIOremoteDockHandler handler;

    public void setThingHandler(@Nullable ThingHandler handler) {
        this.handler = (YIOremoteDockHandler) handler;

    public @Nullable ThingHandler getThingHandler() {
        return handler;

    @RuleAction(label = "@text/actionLabel", description = "@text/actionDesc")
    public void publishIRCODE(
            @ActionInput(name = "ircode", label = "@text/actionInputTopicLabel", description = "@text/actionInputTopicDesc") @Nullable String ircode) {


    public static void publishIRCODE(@Nullable ThingActions actions, @Nullable String ircode) {
        if (actions instanceof YIOremoteDockActions) {
            ((YIOremoteDockActions) actions).publishIRCODE(ircode);
        } else {
            throw new IllegalArgumentException("Instance is not an YIOremoteDockActions class.");

But if I send a action it always says:

val actions = getActions("yiodock","yioremote:yioremotedock:livingroom")

Instance is not an YIOremoteDockActions class.

What is wrong in the implementation?


Never implemented actions in my bindings, but your action is named “yioremote”

and you are calling the action with “yiodock”