Improve tests.

This commit is contained in:
Koenkk
2018-12-06 21:27:41 +01:00
committed by Koen Kanters
parent cb9beaa2ad
commit 698b40554e
6 changed files with 113 additions and 22 deletions
+4 -2
View File
@@ -126,6 +126,8 @@ class Controller {
}
start() {
this.state.start();
this.startupLogVersion(() => {
this.zigbee.start(this.onZigbeeMessage, (error) => {
if (error) {
@@ -142,7 +144,7 @@ class Controller {
this.extensions.filter((e) => e.stop).forEach((e) => e.stop());
// Wrap-up
this.state.save();
this.state.stop();
this.mqtt.disconnect();
this.zigbee.stop(callback);
}
@@ -237,7 +239,7 @@ class Controller {
return {
ieeeAddr,
friendlyName: deviceSettings.friendly_name || '',
friendlyName: deviceSettings ? (deviceSettings.friendly_name || '') : '',
type,
nwkAddr,
manufId,