Skip to content

Instantly share code, notes, and snippets.

@sweetpi
Created March 17, 2016 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sweetpi/c07c0de00bfd7ce3a187 to your computer and use it in GitHub Desktop.
Save sweetpi/c07c0de00bfd7ce3a187 to your computer and use it in GitHub Desktop.
class HomeduinoPlugin extends env.plugins.Plugin
init: (app, @framework, @config) =>
@framework.deviceManager.on('discover', (eventData) =>
@framework.deviceManager.discoverMessage(
'pimatic-homeduino', 'Press a button on your remote'
)
setTimeout( ( =>
config = {
class: 'HomeduinoRFSwitch'
}
@framework.deviceManager.discoveredDevice(
'pimatic-homeduino', 'Switch', config
)
), 1000)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment