Updated some log messages and log levels

This commit is contained in:
dennis committed 2023-02-05 21:08:52 +01:00
1 parent 419870a7b7
commit 65ef31b84a
1 file changed
+6 -7
+6 -7
View File
@@ -147,7 +147,7 @@ export class DeviceAccessory {
} }
// Trigger Scene Button // Trigger Scene Button
this.Log.log('Trigger Scene -> ', this.NextItemToTrigger); this.Log.log('Trigger Event -> ', this.NextItemToTrigger);
this.TriggerButtons[this.NextItemToTrigger++].updateCharacteristic(this.platform.Characteristic.ProgrammableSwitchEvent, 0); this.TriggerButtons[this.NextItemToTrigger++].updateCharacteristic(this.platform.Characteristic.ProgrammableSwitchEvent, 0);
} }
@@ -156,8 +156,7 @@ export class DeviceAccessory {
*/ */
resetTrigger() { resetTrigger() {
this.Log.log('Reset Scene Trigger'); this.Log.log('Reset Scene Trigger');
this.serviceIn.updateCharacteristic(this.platform.Characteristic.On, this.serviceIn.updateCharacteristic(this.platform.Characteristic.On, this.SwitchOn = false);
this.SwitchOn = false);
this.NextItemToTrigger = 0; this.NextItemToTrigger = 0;
} }
@@ -190,7 +189,7 @@ export class DeviceAccessory {
this.resetTrigger(); this.resetTrigger();
} }
this.Log.debug('Set Characteristic On ->', value); this.Log.debug('Set Switch State ->', value);
} }
/** /**
@@ -198,7 +197,7 @@ export class DeviceAccessory {
*/ */
async getOn(): Promise<CharacteristicValue> { async getOn(): Promise<CharacteristicValue> {
const isOn = this.SwitchOn; const isOn = this.SwitchOn;
this.Log.debug('Get Characteristic On ->', isOn); this.Log.debug('Get Switch State ->', isOn);
// if you need to return an error to show the device as "Not Responding" in the Home app: // if you need to return an error to show the device as "Not Responding" in the Home app:
// throw new this.platform.api.hap.HapStatusError(this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE); // throw new this.platform.api.hap.HapStatusError(this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE);
return isOn; return isOn;
@@ -230,7 +229,7 @@ export class DeviceAccessory {
*/ */
async setTriggerTimeout(value: CharacteristicValue) { async setTriggerTimeout(value: CharacteristicValue) {
const triggerTimeout = value as number; const triggerTimeout = value as number;
this.Log.debug('Set Characteristic TriggerTimeout ->', triggerTimeout); this.Log.log('Set Trigger Timeout ->', triggerTimeout);
this.State.triggerTimeout = triggerTimeout; this.State.triggerTimeout = triggerTimeout;
} }
@@ -239,7 +238,7 @@ export class DeviceAccessory {
*/ */
async getTriggerTimeout(): Promise<CharacteristicValue> { async getTriggerTimeout(): Promise<CharacteristicValue> {
const triggerTimeout = this.State.triggerTimeout; const triggerTimeout = this.State.triggerTimeout;
this.Log.debug('Get Characteristic TriggerTimeout ->', triggerTimeout); this.Log.debug('Get Trigger Timeout ->', triggerTimeout);
return triggerTimeout; return triggerTimeout;
} }
} }