-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
31 lines (24 loc) · 1020 Bytes
/
app.js
File metadata and controls
31 lines (24 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict';
const Homey = require('homey');
class NamronApp extends Homey.App {
onInit() {
this.log('Namron app is running...');
//Z-button scene trigger cards
this.triggerWallController_scene = new Homey.FlowCardTriggerDevice('wall_controller_scene');
this.triggerWallController_scene
.register()
.registerRunListener((args, state) =>
Promise.resolve(args.button.id === state.button && args.scene.id === state.scene));
this.triggerWallController_scene
.getArgument('scene')
.registerAutocompleteListener((query, args, callback) => args.device.onSceneAutocomplete(query, args, callback));
this.triggerWallController_scene
.getArgument('button')
.registerAutocompleteListener((query, args, callback) => args.device.onButtonAutocomplete(query, args, callback));
//Z-button button trigger cards
this.triggerWallController_button = new Homey.FlowCardTriggerDevice('wall_controller_button');
this.triggerWallController_button
.register();
}
}
module.exports = NamronApp;