Skip to content

Commit

Permalink
Remove additional space in logging (#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson authored Nov 9, 2024
1 parent 55f5edf commit 144a43d
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/device/blindtilt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ export class BlindTilt extends deviceBase {
})
})
.then(async () => {
this.successLog(`TargetPostion: ${this.WindowCovering.TargetPosition} sent over SwitchBot BLE, sent successfully`)
this.successLog(`TargetPostion: ${this.WindowCovering.TargetPosition} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
4 changes: 2 additions & 2 deletions src/device/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ export class Bot extends deviceBase {
return await deviceList[0].press()
})
.then(async () => {
this.successLog(`On: ${this.On} sent over SwitchBot BLE, sent successfully`)
this.successLog(`On: ${this.On} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
setTimeout(async () => {
this.On = false
Expand Down Expand Up @@ -542,7 +542,7 @@ export class Bot extends deviceBase {
})
})
.then(async () => {
this.successLog(`On: ${this.On} sent over SwitchBot BLE, sent successfully`)
this.successLog(`On: ${this.On} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/device/ceilinglight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export class CeilingLight extends deviceBase {
})
})
.then(async () => {
this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`)
this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`)
this.LightBulb.On = false
})
.catch(async (e: any) => {
Expand Down
8 changes: 4 additions & 4 deletions src/device/colorbulb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export class ColorBulb extends deviceBase {
})
})
.then(async () => {
this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`)
this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down Expand Up @@ -511,7 +511,7 @@ export class ColorBulb extends deviceBase {
return await deviceList[0].setBrightness(Number(this.LightBulb.Brightness))
})
.then(async () => {
this.successLog(`Brightness: ${this.LightBulb.Brightness} sent over SwitchBot BLE, sent successfully`)
this.successLog(`Brightness: ${this.LightBulb.Brightness} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down Expand Up @@ -550,7 +550,7 @@ export class ColorBulb extends deviceBase {
return await deviceList[0].setColorTemperature(kelvin)
})
.then(async () => {
this.successLog(`ColorTemperature: ${this.LightBulb.ColorTemperature} sent over SwitchBot BLE, sent successfully`)
this.successLog(`ColorTemperature: ${this.LightBulb.ColorTemperature} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down Expand Up @@ -590,7 +590,7 @@ export class ColorBulb extends deviceBase {
return await deviceList[0].setRGB(Number(this.LightBulb.Brightness), red, green, blue)
})
.then(async () => {
this.successLog(`RGB: ${(this.LightBulb.Brightness, red, green, blue)} sent over SwitchBot BLE, sent successfully`)
this.successLog(`RGB: ${(this.LightBulb.Brightness, red, green, blue)} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/device/curtain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ export class Curtain extends deviceBase {
})
})
.then(async () => {
this.successLog(`TargetPostion: ${this.WindowCovering.TargetPosition} sent over SwitchBot BLE, sent successfully`)
this.successLog(`TargetPostion: ${this.WindowCovering.TargetPosition} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/device/fan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ export class Fan extends deviceBase {
})
})
.then(async () => {
this.successLog(`Active: ${this.Fan.Active} sent over SwitchBot BLE, sent successfully`)
this.successLog(`Active: ${this.Fan.Active} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/device/humidifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ export class Humidifier extends deviceBase {
return await deviceList[0].percentage(this.HumidifierDehumidifier.RelativeHumidityHumidifierThreshold)
})
.then(async () => {
this.successLog(`RelativeHumidityHumidifierThreshold: ${this.HumidifierDehumidifier.RelativeHumidityHumidifierThreshold} sent over BLE, sent successfully`)
this.successLog(`RelativeHumidityHumidifierThreshold: ${this.HumidifierDehumidifier.RelativeHumidityHumidifierThreshold} sent over BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
6 changes: 3 additions & 3 deletions src/device/lightstrip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export class StripLight extends deviceBase {
})
})
.then(async () => {
this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`)
this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down Expand Up @@ -515,7 +515,7 @@ export class StripLight extends deviceBase {
return await device_list[0].setBrightness(this.LightBulb.Brightness)
})
.then(async () => {
this.successLog(`Brightness: ${this.LightBulb.Brightness} sent over SwitchBot BLE, sent successfully`)
this.successLog(`Brightness: ${this.LightBulb.Brightness} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down Expand Up @@ -554,7 +554,7 @@ export class StripLight extends deviceBase {
return await device_list[0].setRGB(this.LightBulb.Brightness, red, green, blue)
})
.then(async () => {
this.successLog(`RGB: ${(this.LightBulb.Brightness, red, green, blue)} sent over SwitchBot BLE, sent successfully`)
this.successLog(`RGB: ${(this.LightBulb.Brightness, red, green, blue)} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/device/lock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ export class Lock extends deviceBase {
})
})
.then(async () => {
this.successLog(`LockTargetState: ${this.LockMechanism.LockTargetState} sent over SwitchBot BLE, sent successfully`)
this.successLog(`LockTargetState: ${this.LockMechanism.LockTargetState} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/device/plug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export class Plug extends deviceBase {
})
})
.then(async () => {
this.successLog(`On: ${this.Outlet.On} sent over SwitchBot BLE, sent successfully`)
this.successLog(`On: ${this.Outlet.On} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/device/robotvacuumcleaner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ export class RobotVacuumCleaner extends deviceBase {
})
})
.then(async () => {
this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`)
this.successLog(`On: ${this.LightBulb.On} sent over SwitchBot BLE, sent successfully`)
await this.updateHomeKitCharacteristics()
})
.catch(async (e: any) => {
Expand Down
6 changes: 3 additions & 3 deletions src/irdevice/airconditioner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class AirConditioner extends irdeviceBase {
}

async pushAirConditionerStatusChanges(): Promise<void> {
this.debugLog(`pushAirConditionerStatusChanges Active: ${this.HeaterCooler.Active}, disablePushOff: ${this.disablePushOff}, disablePushOn: ${this.disablePushOn}`)
this.debugLog(`pushAirConditionerStatusChanges Active: ${this.HeaterCooler.Active}, disablePushOff: ${this.disablePushOff}, disablePushOn: ${this.disablePushOn}`)
if (!this.Busy) {
this.Busy = true
this.HeaterCooler.CurrentHeaterCoolerState = this.hap.Characteristic.CurrentHeaterCoolerState.IDLE
Expand All @@ -198,7 +198,7 @@ export class AirConditioner extends irdeviceBase {
}

async pushAirConditionerDetailsChanges(): Promise<void> {
this.debugLog(`pushAirConditionerDetailsChanges Active: ${this.HeaterCooler.Active}, disablePushOff: ${this.disablePushOff}, disablePushOn: ${this.disablePushOn}`)
this.debugLog(`pushAirConditionerDetailsChanges Active: ${this.HeaterCooler.Active}, disablePushOff: ${this.disablePushOff}, disablePushOn: ${this.disablePushOn}`)
// await this.deviceContext();
if (this.CurrentMode === undefined) {
this.CurrentMode = 1
Expand Down Expand Up @@ -399,7 +399,7 @@ export class AirConditioner extends irdeviceBase {
async TargetHeaterCoolerStateGet(): Promise<CharacteristicValue> {
const targetState = this.HeaterCooler.TargetHeaterCoolerState || this.accessory.context.TargetHeaterCoolerState
this.HeaterCooler.TargetHeaterCoolerState = this.ValidValues.includes(targetState) ? targetState : this.ValidValues[0]
this.debugLog(`Get (${this.getTargetHeaterCoolerStateName()}) TargetHeaterCoolerState: ${this.HeaterCooler.TargetHeaterCoolerState}, ValidValues: ${this.ValidValues}, hide_automode: ${this.hide_automode}`)
this.debugLog(`Get (${this.getTargetHeaterCoolerStateName()}) TargetHeaterCoolerState: ${this.HeaterCooler.TargetHeaterCoolerState}, ValidValues: ${this.ValidValues}, hide_automode: ${this.hide_automode}`)
return this.HeaterCooler.TargetHeaterCoolerState
}

Expand Down
4 changes: 2 additions & 2 deletions src/irdevice/airpurifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class AirPurifier extends irdeviceBase {
}

async pushAirPurifierStatusChanges(): Promise<void> {
this.debugLog(`pushAirPurifierStatusChanges Active: ${this.AirPurifier.Active}, disablePushOff: ${this.disablePushOff}, disablePushOn: ${this.disablePushOn}`)
this.debugLog(`pushAirPurifierStatusChanges Active: ${this.AirPurifier.Active}, disablePushOff: ${this.disablePushOff}, disablePushOn: ${this.disablePushOn}`)
if (!this.Busy) {
this.Busy = true
this.AirPurifier.CurrentHeaterCoolerState = this.hap.Characteristic.CurrentHeaterCoolerState.IDLE
Expand All @@ -185,7 +185,7 @@ export class AirPurifier extends irdeviceBase {
}

async pushAirPurifierDetailsChanges(): Promise<void> {
this.debugLog(`pushAirPurifierDetailsChanges Active: ${this.AirPurifier.Active}, disablePushOff: ${this.disablePushOff}, disablePushOn: ${this.disablePushOn}`)
this.debugLog(`pushAirPurifierDetailsChanges Active: ${this.AirPurifier.Active}, disablePushOff: ${this.disablePushOff}, disablePushOn: ${this.disablePushOn}`)
this.CurrentAPTemp = this.TemperatureSensor!.CurrentTemperature ?? 24
this.CurrentAPMode = this.CurrentMode ?? 1
this.CurrentAPFanSpeed = this.CurrentFanSpeed ?? 1
Expand Down

0 comments on commit 144a43d

Please sign in to comment.