mirror of
https://github.com/dtwardow/homebridge-multi-tap-switch.git
synced 2026-11-01 20:18:30 +00:00
Changed/fixxed logging
This commit is contained in:
1 parent
035a28c37b
commit
47e49b9e67
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -53,7 +53,7 @@
|
||||
"resetAfterSwitchOff": {
|
||||
"title": "Reset when switch turned `Off`",
|
||||
"type": "boolean",
|
||||
"description": "Reset the switch and trigger index, when the trigger switch is turned `Off` (independent from timeout)",
|
||||
"description": "Reset the switch and trigger index, when the trigger switch is turned <code>Off</code> (independent from timeout)",
|
||||
"required": true,
|
||||
"default": false
|
||||
},
|
||||
|
||||
@@ -21,8 +21,8 @@ export class Logging {
|
||||
|
||||
log(...parts: any) {
|
||||
this.isDebug ?
|
||||
this.logHandler.debug(this.msgPrefix(), ...parts) :
|
||||
this.logHandler.info(this.msgPrefix(), ...parts);
|
||||
this.logHandler.info(this.msgPrefix(), ...parts) :
|
||||
this.logHandler.debug(this.msgPrefix(), ...parts);
|
||||
}
|
||||
|
||||
warn = (...parts: any) => this.logHandler.warn(this.msgPrefix(), ...parts);
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ export class MultiTapSwitchPlatform implements DynamicPlatformPlugin {
|
||||
// existingAccessory.context.device = device;
|
||||
// this.api.updatePlatformAccessories([existingAccessory]);
|
||||
if (existingAccessory.context.config !== device) {
|
||||
this.log.info('Update Accessory ->', device.name);
|
||||
this.log.debug('Update Accessory ->', device.name);
|
||||
existingAccessory.context.config = device;
|
||||
this.api.updatePlatformAccessories([existingAccessory]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user