plugin
is some kind of monkey patch
for external recipe or module to extend MMM-GoogleAssistant's program logic.
You can do something on specific phase of MMM-AssistantGoogle module.
plugins: {
onReady: "DO_SOMETHING"
},
commands: {
"DO_SOMETHING": {
functionExec: ()=> {
console.log("This will be executed when `onReady` phase.")
}
}
}
onReady: ()=>{}
onNotificationReceived: (noti, payload)=>{}
onActivate: () => {}
onStatus: (status) => {}
onReady
: with be executed when Assistant is ready (first Launch of GoogleAssistant)onNotificationReceived
: will be executed on every notification received from other modulesonActivate
: will be executed when assistant is activated and can you can use the notification name and the payload of itonStatus
: will be executed on each status change and you can use the status name (status.actual
: actual status, status.old
: last status)