WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

The event trigger is trying to call the function with the parameters from the event, but your function doesn't declare those parameters. It appears they are device_id and tag_id. So you should declare the function like this:

@event_trigger("tag_scanned", "tag_id == '<here>'")
def scanned_trigger(device_id=None, tag_id=None):
    ....

See the docs.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Danahi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants