Example
/app.js
const Homey = require('homey');
class MyApp extends Homey.App {
async onInit() {
this.log('MyApp has been initialized');
}
}
module.exports = MyApp;
Extends
Properties
id :string
The app id
Type:
-
string
manifest :any
The app.json manifest
Type:
-
any
sdk :number
The app sdk version
Type:
-
number
Methods
error(…args)
Log a message to the console (stderr)
- Overrides:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
*
|
<repeatable> |
log(…args)
Log a message to the console (stdout)
- Overrides:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
*
|
<repeatable> |
(async) onInit()
This method is called upon initialization of your app.