-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
47 lines (35 loc) · 1.13 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
'use strict';
const { triggerAsyncId } = require('async_hooks');
const Homey = require('homey');
class TeslaLogger extends Homey.App {
async onInit() {
if (process.env.DEBUG === '1'){
try{
require('inspector').waitForDebugger();
}
catch(error){
require('inspector').open(9225, '0.0.0.0', true);
}
}
//Schreibe ins Log
this.log(`${Homey.manifest.id}-${Homey.manifest.version}-Initialization ....`);
await super.onInit();
//Aktions-Karten
//pihole-disable-piholes.json
//Bereich für Triggerkarten
//alarm_core_update_available_true.json
// this._coreUpdateAvailable = this.homey.flow.getTriggerCard('alarm_core_update_available_true')
// this._coreUpdateAvailable.registerRunListener(async (args, state) => {
// try{
// await args.device.device(this.getName());
// await args.device.service('Core');
// return true;
// }
// catch(error){
// this.error("Error executing flowAction 'alarm_core_update_available_true': "+ error.message);
// throw new Error(error.message);
// }
// });
}
}
module.exports = TeslaLogger;