@switchbot/homebridge-switchbot 2.2.0-beta.4 → 2.2.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/irdevice/airconditioner.d.ts.map +1 -1
  2. package/dist/irdevice/airconditioner.js +4 -0
  3. package/dist/irdevice/airconditioner.js.map +1 -1
  4. package/dist/irdevice/airpurifier.d.ts.map +1 -1
  5. package/dist/irdevice/airpurifier.js +4 -0
  6. package/dist/irdevice/airpurifier.js.map +1 -1
  7. package/dist/irdevice/camera.d.ts.map +1 -1
  8. package/dist/irdevice/camera.js +6 -2
  9. package/dist/irdevice/camera.js.map +1 -1
  10. package/dist/irdevice/fan.d.ts.map +1 -1
  11. package/dist/irdevice/fan.js +4 -0
  12. package/dist/irdevice/fan.js.map +1 -1
  13. package/dist/irdevice/light.d.ts.map +1 -1
  14. package/dist/irdevice/light.js +4 -0
  15. package/dist/irdevice/light.js.map +1 -1
  16. package/dist/irdevice/other.d.ts.map +1 -1
  17. package/dist/irdevice/other.js +6 -2
  18. package/dist/irdevice/other.js.map +1 -1
  19. package/dist/irdevice/tv.d.ts.map +1 -1
  20. package/dist/irdevice/tv.js +5 -1
  21. package/dist/irdevice/tv.js.map +1 -1
  22. package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
  23. package/dist/irdevice/vacuumcleaner.js +4 -0
  24. package/dist/irdevice/vacuumcleaner.js.map +1 -1
  25. package/dist/irdevice/waterheater.d.ts.map +1 -1
  26. package/dist/irdevice/waterheater.js +4 -0
  27. package/dist/irdevice/waterheater.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/irdevice/airconditioner.ts +4 -0
  30. package/src/irdevice/airpurifier.ts +4 -0
  31. package/src/irdevice/camera.ts +6 -2
  32. package/src/irdevice/fan.ts +4 -0
  33. package/src/irdevice/light.ts +4 -0
  34. package/src/irdevice/other.ts +7 -3
  35. package/src/irdevice/tv.ts +5 -1
  36. package/src/irdevice/vacuumcleaner.ts +4 -0
  37. package/src/irdevice/waterheater.ts +4 -0
@@ -83,6 +83,8 @@ export class Light {
83
83
  * Light - "command" "channelSub" "default" = previous channel
84
84
  */
85
85
  async pushLightOnChanges(): Promise<void> {
86
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushLightOnChanges On: ${this.On},`
87
+ + ` allowPushOn: ${this.allowPushOn}`);
86
88
  if (this.On || this.allowPushOn) {
87
89
  const commandType: string = await this.commandType();
88
90
  const command: string = await this.commandOn();
@@ -96,6 +98,8 @@ export class Light {
96
98
  }
97
99
 
98
100
  async pushLightOffChanges(): Promise<void> {
101
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushLightOffChanges On: ${this.On},`
102
+ + ` allowPushOff: ${this.allowPushOff}`);
99
103
  if (!this.On || this.allowPushOff) {
100
104
  const commandType: string = await this.commandType();
101
105
  const command: string = await this.commandOff();
@@ -91,8 +91,10 @@ export class Others {
91
91
  * Other - "command" "channelSub" "default" = previous channel
92
92
  */
93
93
  async pushOnChanges(): Promise<void> {
94
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushOnChanges Active: ${this.Active},`
95
+ + ` allowPushOn: ${this.allowPushOn}, customize: ${this.device.customize}, customOn: ${this.device.customOn}`);
94
96
  if (this.device.customize) {
95
- if (!this.Active) {
97
+ if (this.Active === this.platform.Characteristic.Active.INACTIVE || this.allowPushOn) {
96
98
  const commandType: string = await this.commandType();
97
99
  const command: string = await this.commandOn();
98
100
  const body = superStringify({
@@ -108,8 +110,10 @@ export class Others {
108
110
  }
109
111
 
110
112
  async pushOffChanges(): Promise<void> {
113
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushOffChanges Active: ${this.Active},`
114
+ + ` allowPushOff: ${this.allowPushOff}, customize: ${this.device.customize}, customOff: ${this.device.customOff}`);
111
115
  if (this.device.customize) {
112
- if (this.Active) {
116
+ if (this.Active === this.platform.Characteristic.Active.ACTIVE || this.allowPushOff) {
113
117
  const commandType: string = await this.commandType();
114
118
  const command: string = await this.commandOff();
115
119
  const body = superStringify({
@@ -124,7 +128,7 @@ export class Others {
124
128
  }
125
129
  }
126
130
 
127
- async pushChanges(body): Promise<void> {
131
+ async pushChanges(body: any): Promise<void> {
128
132
  if (this.device.connectionType === 'OpenAPI') {
129
133
  try {
130
134
  // Make Push On request to the API
@@ -227,6 +227,8 @@ export class TV {
227
227
  * TV "command" "channelSub" "default" previous channel
228
228
  */
229
229
  async pushTvOnChanges(): Promise<void> {
230
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushTvOnChanges Active: ${this.Active},`
231
+ + ` allowPushOn: ${this.allowPushOn}`);
230
232
  if (this.Active === this.platform.Characteristic.Active.INACTIVE || this.allowPushOn) {
231
233
  const commandType: string = await this.commandType();
232
234
  const command: string = await this.commandOn();
@@ -240,7 +242,9 @@ export class TV {
240
242
  }
241
243
 
242
244
  async pushTvOffChanges(): Promise<void> {
243
- if (this.Active === this.platform.Characteristic.Active.ACTIVE || this.allowPushOn) {
245
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushTvOffChanges Active: ${this.Active},`
246
+ + ` allowPushOff: ${this.allowPushOff}`);
247
+ if (this.Active === this.platform.Characteristic.Active.ACTIVE || this.allowPushOff) {
244
248
  const commandType: string = await this.commandType();
245
249
  const command: string = await this.commandOff();
246
250
  const body = superStringify({
@@ -79,6 +79,8 @@ export class VacuumCleaner {
79
79
  * Vacuum Cleaner "command" "turnOn" "default" set to ON state
80
80
  */
81
81
  async pushOnChanges(): Promise<void> {
82
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushOnChanges On: ${this.On},`
83
+ + ` allowPushOn: ${this.allowPushOn}`);
82
84
  if (this.On || this.allowPushOn) {
83
85
  const commandType: string = await this.commandType();
84
86
  const command: string = await this.commandOn();
@@ -92,6 +94,8 @@ export class VacuumCleaner {
92
94
  }
93
95
 
94
96
  async pushOffChanges(): Promise<void> {
97
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushOffChanges On: ${this.On},`
98
+ + ` allowPushOff: ${this.allowPushOff}`);
95
99
  if (!this.On || this.allowPushOff) {
96
100
  const commandType: string = await this.commandType();
97
101
  const command: string = await this.commandOff();
@@ -85,6 +85,8 @@ export class WaterHeater {
85
85
  * WaterHeater "command" "turnOn" "default" set to ON state
86
86
  */
87
87
  async pushWaterHeaterOnChanges(): Promise<void> {
88
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushWaterHeaterOnChanges Active: ${this.Active},`
89
+ + ` allowPushOn: ${this.allowPushOn}`);
88
90
  if (this.Active === this.platform.Characteristic.Active.INACTIVE || this.allowPushOn) {
89
91
  const commandType: string = await this.commandType();
90
92
  const command: string = await this.commandOn();
@@ -98,6 +100,8 @@ export class WaterHeater {
98
100
  }
99
101
 
100
102
  async pushWaterHeaterOffChanges(): Promise<void> {
103
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushWaterHeaterOffChanges Active: ${this.Active},`
104
+ + ` allowPushOff: ${this.allowPushOff}`);
101
105
  if (this.Active === this.platform.Characteristic.Active.ACTIVE || this.allowPushOff) {
102
106
  const commandType: string = await this.commandType();
103
107
  const command: string = await this.commandOff();