Enforce code style. #45

This commit is contained in:
Koenkk
2018-05-17 17:20:46 +02:00
parent 5a95e2fc8c
commit c5cb60e998
16 changed files with 222 additions and 188 deletions
+6 -5
View File
@@ -5,11 +5,10 @@ const data = require('./util/data');
const shepherdSettings = {
net: {panId: settings.get().advanced.pan_id},
dbPath: data.joinPath('database.db')
dbPath: data.joinPath('database.db'),
};
class Zigbee {
constructor() {
this.handleReady = this.handleReady.bind(this);
this.handleMessage = this.handleMessage.bind(this);
@@ -39,7 +38,7 @@ class Zigbee {
stop(callback) {
this.shepherd.stop((error) => {
logger.info('zigbee-shepherd stopped')
logger.info('zigbee-shepherd stopped');
callback(error);
});
}
@@ -52,7 +51,7 @@ class Zigbee {
if (device.manufId === 4151) {
this.shepherd.find(device.ieeeAddr, 1).getDevice().update({
status: 'online',
joinTime: Math.floor(Date.now()/1000)
joinTime: Math.floor(Date.now() / 1000),
});
}
});
@@ -100,7 +99,9 @@ class Zigbee {
device = this.shepherd.find(deviceID, ep);
if (!device) {
logger.error(`Zigbee cannot publish message to device because '${deviceID}' is not known by zigbee-shepherd`);
logger.error(
`Zigbee cannot publish message to device because '${deviceID}' is not known by zigbee-shepherd`
);
return;
}