hueadm
Version:
A command line management interface to phillips hue
38 lines (29 loc) • 682 B
JavaScript
var common = require('../common');
module.exports = scene;
function scene(subcmd, opts, args, cb) {
var self = this;
var finish = common.makeFinisher(opts, cb);
if (opts.help) {
self.do_help('help', {}, [subcmd], cb);
return;
}
var id = args.shift();
if (!id) {
cb(new Error('first argument must be supplied'));
return;
}
self.client.scene(id, finish);
}
scene.options = [
{
names: ['help', 'h'],
type: 'bool',
help: 'Show this help.'
},
{
names: ['json', 'j'],
type: 'bool',
help: 'JSON output.'
}
];
scene.help = 'Show a scene\n\n{{options}}';