Files
zigbee2mqtt/test/assets/external_extensions/cjs/exampleExtension.js
T

17 lines
393 B
JavaScript

class Example {
constructor(zigbee, mqtt, state, publishEntityState, eventBus) {
this.mqtt = mqtt;
this.mqtt.publish('example/extension', 'call from constructor');
}
start() {
this.mqtt.publish('example/extension', 'call from start');
}
stop() {
this.mqtt.publish('example/extension', 'call from stop');
}
}
module.exports = Example;