Skip to content

When I invoke an action it returns undefined #496

Open
@alvarogar23

Description

@alvarogar23

Hi, in my project I have defined the following action handler that is used to pair two devices:

Server servient.

let allowedID = [1, 2];

thing.setActionHandler('pairing', (id) => {
            return allowedID.includes(id)
            
        });

Then in my client Servient I invoke the action in the following way and it returns undefined when it should be returning true or false:

Client Servient.

thing.invokeAction('pairing', 1).then(x => console.log(x));

I don't know if my code is wrong or if it is another error.

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    binding-mqttIssues related to mqtt protocol binding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions