cowboysdude / MMM-MLB

Major League Baseball scores for MM2
6 stars 2 forks source link

preparation for voice control #1

Closed fewieden closed 7 years ago

fewieden commented 7 years ago

Ok John, as promised here is the first brick to enable voice control to your module.

The module sends a notification 'GET_STANDINGS' with the payload "AMERICAN" or "NATIONAL". So you have to handle those notifications in your node_helper and query that data. Then you have to send back a notification 'STANDINGS_RESULTS' with the requested standings.

As the last step you have to create an if statement in which you will check if this.standings is not false, then you render the standings. If this.standings is false you render the matches as you do now already.