-
Notifications
You must be signed in to change notification settings - Fork 11
Event functions
Jan Gabrielsson edited this page Apr 2, 2018
·
32 revisions
Event.event(<event>,<action>)
<event>
is a Lua table with a 'type' key.
e.g. {type='property', deviceID=58, propertyName='value'}
.
<action>
is a Lua function that should be called when an event is received matching the first argument.
e.g. function(env) fibaro:debug("Ding!") end
Functions take one argument, and 'environment' with context info.
Event.post(<event>[,<time>])
Event.schedule(<time>,<action>[,<options>])
Event.cancel(<postRef>)
Event.postRemote(<id>,<event>)
...