@switchbot/homebridge-switchbot 4.0.1-beta.0 → 4.0.1-beta.2

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 (38) hide show
  1. package/config.schema.json +8 -2
  2. package/dist/device/bot.js +2 -2
  3. package/dist/device/bot.js.map +1 -1
  4. package/dist/device/curtain.js +1 -1
  5. package/dist/device/curtain.js.map +1 -1
  6. package/dist/irdevice/airconditioner.js +1 -1
  7. package/dist/irdevice/airconditioner.js.map +1 -1
  8. package/dist/irdevice/airpurifier.js +1 -1
  9. package/dist/irdevice/airpurifier.js.map +1 -1
  10. package/dist/irdevice/camera.js +1 -1
  11. package/dist/irdevice/camera.js.map +1 -1
  12. package/dist/irdevice/fan.js +1 -1
  13. package/dist/irdevice/fan.js.map +1 -1
  14. package/dist/irdevice/irdevice.js +1 -1
  15. package/dist/irdevice/irdevice.js.map +1 -1
  16. package/dist/irdevice/light.js +1 -1
  17. package/dist/irdevice/light.js.map +1 -1
  18. package/dist/irdevice/other.js +1 -1
  19. package/dist/irdevice/other.js.map +1 -1
  20. package/dist/irdevice/tv.js +1 -1
  21. package/dist/irdevice/tv.js.map +1 -1
  22. package/dist/irdevice/vacuumcleaner.js +1 -1
  23. package/dist/irdevice/vacuumcleaner.js.map +1 -1
  24. package/dist/irdevice/waterheater.js +1 -1
  25. package/dist/irdevice/waterheater.js.map +1 -1
  26. package/package.json +7 -7
  27. package/src/device/bot.ts +2 -2
  28. package/src/device/curtain.ts +1 -1
  29. package/src/irdevice/airconditioner.ts +1 -1
  30. package/src/irdevice/airpurifier.ts +1 -1
  31. package/src/irdevice/camera.ts +1 -1
  32. package/src/irdevice/fan.ts +1 -1
  33. package/src/irdevice/irdevice.ts +1 -1
  34. package/src/irdevice/light.ts +1 -1
  35. package/src/irdevice/other.ts +1 -1
  36. package/src/irdevice/tv.ts +1 -1
  37. package/src/irdevice/vacuumcleaner.ts +1 -1
  38. package/src/irdevice/waterheater.ts +1 -1
@@ -98,7 +98,7 @@ export class Camera extends irdeviceBase {
98
98
  async pushChanges(bodyChange: any): Promise<void> {
99
99
  await this.debugLog('pushChanges')
100
100
  if (this.device.connectionType === 'OpenAPI') {
101
- this.infoLog(`Sending request to SwitchBot API, body: ${bodyChange},`)
101
+ await this.infoLog(`Sending request to SwitchBot API, body: ${JSON.stringify(bodyChange)}`)
102
102
  try {
103
103
  const { body } = await this.pushChangeRequest(bodyChange)
104
104
  const deviceStatus: any = await body
@@ -189,7 +189,7 @@ export class IRFan extends irdeviceBase {
189
189
  async pushChanges(bodyChange: any): Promise<void> {
190
190
  await this.debugLog('pushChanges')
191
191
  if (this.device.connectionType === 'OpenAPI') {
192
- this.infoLog(`Sending request to SwitchBot API, body: ${bodyChange},`)
192
+ await this.infoLog(`Sending request to SwitchBot API, body: ${JSON.stringify(bodyChange)}`)
193
193
  try {
194
194
  const { body } = await this.pushChangeRequest(bodyChange)
195
195
  const deviceStatus: any = await body
@@ -175,7 +175,7 @@ export abstract class irdeviceBase {
175
175
 
176
176
  async successfulPushChange(deviceStatus: any, bodyChange: any) {
177
177
  this.debugSuccessLog(`deviceStatus StatusCode: ${deviceStatus.statusCode}`)
178
- this.successLog(`request to SwitchBot API, body: ${JSON.stringify(JSON.parse(bodyChange))} sent successfully`)
178
+ this.successLog(`request to SwitchBot API, body: ${JSON.stringify(bodyChange)} sent successfully`)
179
179
  }
180
180
 
181
181
  async pushChangeError(e: Error) {
@@ -196,7 +196,7 @@ export class Light extends irdeviceBase {
196
196
  async pushChanges(bodyChange: any, On: boolean): Promise<void> {
197
197
  this.debugLog('pushChanges')
198
198
  if (this.device.connectionType === 'OpenAPI') {
199
- this.infoLog(`Sending request to SwitchBot API, body: ${bodyChange},`)
199
+ await this.infoLog(`Sending request to SwitchBot API, body: ${JSON.stringify(bodyChange)}`)
200
200
  try {
201
201
  const { body } = await this.pushChangeRequest(bodyChange)
202
202
  const deviceStatus: any = await body
@@ -445,7 +445,7 @@ export class Others extends irdeviceBase {
445
445
  async pushChanges(bodyChange: any): Promise<void> {
446
446
  await this.debugLog('pushChanges')
447
447
  if (this.device.connectionType === 'OpenAPI') {
448
- this.infoLog(`Sending request to SwitchBot API, body: ${bodyChange},`)
448
+ await this.infoLog(`Sending request to SwitchBot API, body: ${JSON.stringify(bodyChange)}`)
449
449
  try {
450
450
  const { body } = await this.pushChangeRequest(bodyChange)
451
451
  const deviceStatus: any = await body
@@ -344,7 +344,7 @@ export class TV extends irdeviceBase {
344
344
  async pushTVChanges(bodyChange: any): Promise<void> {
345
345
  await this.debugLog('pushTVChanges')
346
346
  if (this.device.connectionType === 'OpenAPI') {
347
- await this.infoLog(`Sending request to SwitchBot API, body: ${bodyChange},`)
347
+ await this.infoLog(`Sending request to SwitchBot API, body: ${JSON.stringify(bodyChange)}`)
348
348
  try {
349
349
  const { body } = await this.pushChangeRequest(bodyChange)
350
350
  const deviceStatus: any = await body
@@ -95,7 +95,7 @@ export class VacuumCleaner extends irdeviceBase {
95
95
  async pushChanges(bodyChange: any): Promise<void> {
96
96
  await this.debugLog('pushChanges')
97
97
  if (this.device.connectionType === 'OpenAPI') {
98
- await this.infoLog(`Sending request to SwitchBot API, body: ${bodyChange},`)
98
+ await this.infoLog(`Sending request to SwitchBot API, body: ${JSON.stringify(bodyChange)}`)
99
99
  try {
100
100
  const { body } = await this.pushChangeRequest(bodyChange)
101
101
  const deviceStatus: any = await body
@@ -96,7 +96,7 @@ export class WaterHeater extends irdeviceBase {
96
96
  async pushChanges(bodyChange: any): Promise<void> {
97
97
  await this.debugLog('pushChanges')
98
98
  if (this.device.connectionType === 'OpenAPI') {
99
- this.infoLog(`Sending request to SwitchBot API, body: ${bodyChange},`)
99
+ await this.infoLog(`Sending request to SwitchBot API, body: ${JSON.stringify(bodyChange)}`)
100
100
  try {
101
101
  const { body } = await this.pushChangeRequest(bodyChange)
102
102
  const deviceStatus: any = await body