-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathapp.js
25 lines (24 loc) · 862 Bytes
/
app.js
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
/* global Homey */
'use strict'
var Geofences = require('./lib/geofences.js')
var FlowActions = require('../../lib/flow/actions.js')
var FlowConditions = require('../../lib/flow/conditions.js')
var FlowTriggers = require('../../lib/flow/triggers.js')
var SpeechHandlers = require('../../lib/speech/speech.js')
var self = module.exports = { // eslint-disable-line
init: function () {
Geofences.geofencesInitiationOnAppStart()
FlowTriggers.init()
FlowConditions.init()
FlowActions.init()
SpeechHandlers.init()
}, // end of module init function
getDriverApi: function (homeyDriverName) {
return Homey.manager('drivers').getDriver(homeyDriverName).getApi()
},
testApi: function () {
Homey.manifest.drivers.map((driver) => driver.id).forEach((driver) => {
Homey.manager('drivers').getDriver(driver).testApi()
})
}
}