mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-27 21:20:03 +00:00
Enforce code style. #45
This commit is contained in:
+6
-5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user