mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-03 10:31:37 +00:00
9907005256
* feat: Live loading of external JS (converters/extensions) * Fix imports * Improve error message on MQTT save * Handle non-existing base path * Throw on bad converter * Add tests * Fix use of ext conv in network map tests. * More coverage. * Dont mock zhc for basics, tests actual live loading * Update * feat: Live loading of external JS (converters/extensions) * Fix imports * Improve error message on MQTT save * Handle non-existing base path * Throw on bad converter * Add tests * Fix use of ext conv in network map tests. * More coverage. * Dont mock zhc for basics, tests actual live loading * Update * Fix rebase * Fix * Bump zhc * pretty * fix typing * Cleanup `external_converters` setting remnants. --------- Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
17 lines
400 B
JavaScript
17 lines
400 B
JavaScript
class Example2 {
|
|
constructor(zigbee, mqtt, state, publishEntityState, eventBus) {
|
|
this.mqtt = mqtt;
|
|
this.mqtt.publish('example2/extension', 'call2 from constructor');
|
|
}
|
|
|
|
start() {
|
|
this.mqtt.publish('example2/extension', 'call2 from start');
|
|
}
|
|
|
|
stop() {
|
|
this.mqtt.publish('example/extension', 'call2 from stop');
|
|
}
|
|
}
|
|
|
|
module.exports = Example2;
|