@switchbot/homebridge-switchbot 1.5.1-beta.2 → 1.5.1-beta.3

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 (70) hide show
  1. package/dist/devices/bots.d.ts.map +1 -1
  2. package/dist/devices/bots.js +3 -8
  3. package/dist/devices/bots.js.map +1 -1
  4. package/dist/devices/colorbulb.d.ts.map +1 -1
  5. package/dist/devices/colorbulb.js +5 -10
  6. package/dist/devices/colorbulb.js.map +1 -1
  7. package/dist/devices/contact.d.ts.map +1 -1
  8. package/dist/devices/contact.js +5 -10
  9. package/dist/devices/contact.js.map +1 -1
  10. package/dist/devices/curtains.d.ts.map +1 -1
  11. package/dist/devices/curtains.js +5 -10
  12. package/dist/devices/curtains.js.map +1 -1
  13. package/dist/devices/humidifiers.d.ts.map +1 -1
  14. package/dist/devices/humidifiers.js +5 -10
  15. package/dist/devices/humidifiers.js.map +1 -1
  16. package/dist/devices/meters.d.ts.map +1 -1
  17. package/dist/devices/meters.js +5 -10
  18. package/dist/devices/meters.js.map +1 -1
  19. package/dist/devices/motion.d.ts.map +1 -1
  20. package/dist/devices/motion.js +5 -10
  21. package/dist/devices/motion.js.map +1 -1
  22. package/dist/devices/plugs.d.ts.map +1 -1
  23. package/dist/devices/plugs.js +5 -10
  24. package/dist/devices/plugs.js.map +1 -1
  25. package/dist/irdevices/airconditioners.d.ts.map +1 -1
  26. package/dist/irdevices/airconditioners.js +5 -10
  27. package/dist/irdevices/airconditioners.js.map +1 -1
  28. package/dist/irdevices/airpurifiers.d.ts.map +1 -1
  29. package/dist/irdevices/airpurifiers.js +5 -10
  30. package/dist/irdevices/airpurifiers.js.map +1 -1
  31. package/dist/irdevices/cameras.d.ts.map +1 -1
  32. package/dist/irdevices/cameras.js +5 -10
  33. package/dist/irdevices/cameras.js.map +1 -1
  34. package/dist/irdevices/fans.d.ts.map +1 -1
  35. package/dist/irdevices/fans.js +5 -10
  36. package/dist/irdevices/fans.js.map +1 -1
  37. package/dist/irdevices/lights.d.ts.map +1 -1
  38. package/dist/irdevices/lights.js +5 -10
  39. package/dist/irdevices/lights.js.map +1 -1
  40. package/dist/irdevices/others.d.ts +2 -0
  41. package/dist/irdevices/others.d.ts.map +1 -1
  42. package/dist/irdevices/others.js +32 -16
  43. package/dist/irdevices/others.js.map +1 -1
  44. package/dist/irdevices/tvs.d.ts.map +1 -1
  45. package/dist/irdevices/tvs.js +5 -10
  46. package/dist/irdevices/tvs.js.map +1 -1
  47. package/dist/irdevices/vacuumcleaners.d.ts.map +1 -1
  48. package/dist/irdevices/vacuumcleaners.js +5 -10
  49. package/dist/irdevices/vacuumcleaners.js.map +1 -1
  50. package/dist/irdevices/waterheaters.d.ts.map +1 -1
  51. package/dist/irdevices/waterheaters.js +5 -10
  52. package/dist/irdevices/waterheaters.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/devices/bots.ts +3 -8
  55. package/src/devices/colorbulb.ts +5 -10
  56. package/src/devices/contact.ts +5 -10
  57. package/src/devices/curtains.ts +5 -10
  58. package/src/devices/humidifiers.ts +5 -10
  59. package/src/devices/meters.ts +5 -10
  60. package/src/devices/motion.ts +5 -10
  61. package/src/devices/plugs.ts +5 -10
  62. package/src/irdevices/airconditioners.ts +5 -10
  63. package/src/irdevices/airpurifiers.ts +5 -10
  64. package/src/irdevices/cameras.ts +5 -10
  65. package/src/irdevices/fans.ts +5 -10
  66. package/src/irdevices/lights.ts +5 -10
  67. package/src/irdevices/others.ts +33 -16
  68. package/src/irdevices/tvs.ts +5 -10
  69. package/src/irdevices/vacuumcleaners.ts +5 -10
  70. package/src/irdevices/waterheaters.ts +5 -10
@@ -128,24 +128,19 @@ export class Motion {
128
128
  logs() {
129
129
  if (this.platform.debugMode) {
130
130
  this.deviceLogging = this.accessory.context.logging = 'debug';
131
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
132
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
133
- }
131
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
134
132
  } else if (this.device.logging) {
135
133
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
136
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
137
- this.warnLog(`Motion Sensor: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
134
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
135
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
138
136
  }
139
137
  } else if (this.platform.config.options?.logging) {
140
138
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
141
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
142
- this.warnLog(`Motion Sensor: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
139
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
140
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
143
141
  }
144
142
  } else {
145
143
  this.deviceLogging = this.accessory.context.logging = 'standard';
146
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
147
- this.warnLog(`Motion Sensor: ${this.accessory.displayName} Using Device Standard Logging`);
148
- }
149
144
  }
150
145
  }
151
146
 
@@ -131,24 +131,19 @@ export class Plug {
131
131
  logs() {
132
132
  if (this.platform.debugMode) {
133
133
  this.deviceLogging = this.accessory.context.logging = 'debug';
134
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
135
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
136
- }
134
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
137
135
  } else if (this.device.logging) {
138
136
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
139
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
140
- this.warnLog(`Plug: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
137
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
138
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
141
139
  }
142
140
  } else if (this.platform.config.options?.logging) {
143
141
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
144
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
145
- this.warnLog(`Plug: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
142
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
143
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
146
144
  }
147
145
  } else {
148
146
  this.deviceLogging = this.accessory.context.logging = 'standard';
149
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
150
- this.warnLog(`Plug: ${this.accessory.displayName} Using Device Standard Logging`);
151
- }
152
147
  }
153
148
  }
154
149
 
@@ -169,24 +169,19 @@ export class AirConditioner {
169
169
  logs() {
170
170
  if (this.platform.debugMode) {
171
171
  this.deviceLogging = this.accessory.context.logging = 'debug';
172
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
173
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
174
- }
172
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
175
173
  } else if (this.device.logging) {
176
174
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
177
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
178
- this.warnLog(`Air Conditioner: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
175
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
176
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
179
177
  }
180
178
  } else if (this.platform.config.options?.logging) {
181
179
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
182
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
183
- this.warnLog(`Air Conditioner: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
180
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
181
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
184
182
  }
185
183
  } else {
186
184
  this.deviceLogging = this.accessory.context.logging = 'standard';
187
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
188
- this.warnLog(`Air Conditioner: ${this.accessory.displayName} Using Device Standard Logging`);
189
- }
190
185
  }
191
186
  }
192
187
 
@@ -90,24 +90,19 @@ export class AirPurifier {
90
90
  logs() {
91
91
  if (this.platform.debugMode) {
92
92
  this.deviceLogging = this.accessory.context.logging = 'debug';
93
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
94
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
95
- }
93
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
96
94
  } else if (this.device.logging) {
97
95
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
98
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
99
- this.warnLog(`Air Purifier: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
96
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
97
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
100
98
  }
101
99
  } else if (this.platform.config.options?.logging) {
102
100
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
103
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
104
- this.warnLog(`Air Purifier: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
101
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
102
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
105
103
  }
106
104
  } else {
107
105
  this.deviceLogging = this.accessory.context.logging = 'standard';
108
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
109
- this.warnLog(`Air Purifier: ${this.accessory.displayName} Using Device Standard Logging`);
110
- }
111
106
  }
112
107
  }
113
108
 
@@ -60,24 +60,19 @@ export class Camera {
60
60
  logs() {
61
61
  if (this.platform.debugMode) {
62
62
  this.deviceLogging = this.accessory.context.logging = 'debug';
63
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
64
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
65
- }
63
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
66
64
  } else if (this.device.logging) {
67
65
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
68
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
69
- this.warnLog(`Camera: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
66
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
67
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
70
68
  }
71
69
  } else if (this.platform.config.options?.logging) {
72
70
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
73
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
74
- this.warnLog(`Camera: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
71
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
72
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
75
73
  }
76
74
  } else {
77
75
  this.deviceLogging = this.accessory.context.logging = 'standard';
78
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
79
- this.warnLog(`Camera: ${this.accessory.displayName} Using Device Standard Logging`);
80
- }
81
76
  }
82
77
  }
83
78
 
@@ -119,24 +119,19 @@ export class Fan {
119
119
  logs() {
120
120
  if (this.platform.debugMode) {
121
121
  this.deviceLogging = this.accessory.context.logging = 'debug';
122
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
123
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
124
- }
122
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
125
123
  } else if (this.device.logging) {
126
124
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
127
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
128
- this.warnLog(`Fan: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
125
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
126
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
129
127
  }
130
128
  } else if (this.platform.config.options?.logging) {
131
129
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
132
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
133
- this.warnLog(`Fan: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
130
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
131
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
134
132
  }
135
133
  } else {
136
134
  this.deviceLogging = this.accessory.context.logging = 'standard';
137
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
138
- this.warnLog(`Fan: ${this.accessory.displayName} Using Device Standard Logging`);
139
- }
140
135
  }
141
136
  }
142
137
 
@@ -75,24 +75,19 @@ export class Light {
75
75
  logs() {
76
76
  if (this.platform.debugMode) {
77
77
  this.deviceLogging = this.accessory.context.logging = 'debug';
78
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
79
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
80
- }
78
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
81
79
  } else if (this.device.logging) {
82
80
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
83
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
84
- this.warnLog(`Light: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
81
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
82
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
85
83
  }
86
84
  } else if (this.platform.config.options?.logging) {
87
85
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
88
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
89
- this.warnLog(`Light: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
86
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
87
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
90
88
  }
91
89
  } else {
92
90
  this.deviceLogging = this.accessory.context.logging = 'standard';
93
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
94
- this.warnLog(`Light: ${this.accessory.displayName} Using Device Standard Logging`);
95
- }
96
91
  }
97
92
  }
98
93
 
@@ -18,6 +18,7 @@ export class Others {
18
18
 
19
19
  // Config
20
20
  deviceLogging!: string;
21
+ otherDeviceType?: string;
21
22
 
22
23
  constructor(
23
24
  private readonly platform: SwitchBotPlatform,
@@ -26,6 +27,7 @@ export class Others {
26
27
  ) {
27
28
  // default placeholders
28
29
  this.logs();
30
+ this.deviceType();
29
31
  if (this.Active === undefined) {
30
32
  this.Active = this.platform.Characteristic.Active.INACTIVE;
31
33
  } else {
@@ -41,40 +43,55 @@ export class Others {
41
43
 
42
44
  // get the Television service if it exists, otherwise create a new Television service
43
45
  // you can create multiple services for each accessory
44
- this.service = accessory.getService(this.platform.Service.Fanv2);
45
- if (!this.service && device?.other?.deviceType === 'Fan') {
46
- this.service = accessory.addService(this.platform.Service.Fanv2, `${accessory.displayName} Fan`);
46
+ if (this.otherDeviceType !== 'Fan') {
47
+ this.debugLog(`Other: ${accessory.displayName} Removing Fanv2 Service`);
47
48
 
48
- this.service.setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
49
+ if (this.otherDeviceType === undefined) {
50
+ this.errorLog(`Other: ${this.accessory.displayName} No Device Type Set, deviceType: ${device.other?.deviceType}`);
51
+ }
52
+ this.service = this.accessory.getService(this.platform.Service.Fanv2);
53
+ accessory.removeService(this.service!);
54
+ } else if (!this.service && this.otherDeviceType === 'Fan') {
55
+ this.debugLog(`Other: ${accessory.displayName} Add Fanv2 Service`);
56
+ (this.service =
57
+ this.accessory.getService(this.platform.Service.Fanv2) ||
58
+ this.accessory.addService(this.platform.Service.Fanv2)), `${accessory.displayName} Fan`;
59
+
60
+ this.service.setCharacteristic(this.platform.Characteristic.Name, `${accessory.displayName} Fan`);
49
61
 
50
62
  this.service.getCharacteristic(this.platform.Characteristic.Active).onSet(this.ActiveSet.bind(this));
51
63
  } else {
52
- accessory.removeService(this.service!);
53
- this.errorLog(`Other: ${this.accessory.displayName} No Device Type Set, deviceType: ${device.other?.deviceType}`);
64
+ this.debugLog(`Other: ${accessory.displayName} Fanv2 Service Not Added, deviceType: ${device.other?.deviceType}`);
65
+ }
66
+ }
67
+
68
+ deviceType() {
69
+ if (this.device?.other?.deviceType) {
70
+ this.otherDeviceType = this.accessory.context.deviceType = this.device?.other?.deviceType;
71
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
72
+ this.warnLog(`Other: ${this.accessory.displayName} Using Device Type: ${this.otherDeviceType}`);
73
+ }
74
+ } else {
75
+ this.errorLog(`Other: ${this.accessory.displayName} No Device Type Set, deviceType: ${this.device.other?.deviceType}`);
54
76
  }
55
77
  }
56
78
 
57
79
  logs() {
58
80
  if (this.platform.debugMode) {
59
81
  this.deviceLogging = this.accessory.context.logging = 'debug';
60
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
61
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
62
- }
82
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
63
83
  } else if (this.device.logging) {
64
84
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
65
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
66
- this.warnLog(`Other: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
85
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
86
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
67
87
  }
68
88
  } else if (this.platform.config.options?.logging) {
69
89
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
70
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
71
- this.warnLog(`Other: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
90
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
91
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
72
92
  }
73
93
  } else {
74
94
  this.deviceLogging = this.accessory.context.logging = 'standard';
75
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
76
- this.warnLog(`Other: ${this.accessory.displayName} Using Device Standard Logging`);
77
- }
78
95
  }
79
96
  }
80
97
 
@@ -131,24 +131,19 @@ export class TV {
131
131
  logs() {
132
132
  if (this.platform.debugMode) {
133
133
  this.deviceLogging = this.accessory.context.logging = 'debug';
134
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
135
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
136
- }
134
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
137
135
  } else if (this.device.logging) {
138
136
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
139
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
140
- this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
137
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
138
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
141
139
  }
142
140
  } else if (this.platform.config.options?.logging) {
143
141
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
144
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
145
- this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
142
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
143
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
146
144
  }
147
145
  } else {
148
146
  this.deviceLogging = this.accessory.context.logging = 'standard';
149
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
150
- this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Device Standard Logging`);
151
- }
152
147
  }
153
148
  }
154
149
 
@@ -60,24 +60,19 @@ export class VacuumCleaner {
60
60
  logs() {
61
61
  if (this.platform.debugMode) {
62
62
  this.deviceLogging = this.accessory.context.logging = 'debug';
63
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
64
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
65
- }
63
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
66
64
  } else if (this.device.logging) {
67
65
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
68
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
69
- this.warnLog(`Vacuum Cleaner: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
66
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
67
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
70
68
  }
71
69
  } else if (this.platform.config.options?.logging) {
72
70
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
73
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
74
- this.warnLog(`Vacuum Cleaner: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
71
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
72
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
75
73
  }
76
74
  } else {
77
75
  this.deviceLogging = this.accessory.context.logging = 'standard';
78
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
79
- this.warnLog(`Vacuum Cleaner: ${this.accessory.displayName} Using Device Standard Logging`);
80
- }
81
76
  }
82
77
  }
83
78
 
@@ -69,24 +69,19 @@ export class WaterHeater {
69
69
  logs() {
70
70
  if (this.platform.debugMode) {
71
71
  this.deviceLogging = this.accessory.context.logging = 'debug';
72
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
73
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
74
- }
72
+ this.warnLog(`Water Heater: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
75
73
  } else if (this.device.logging) {
76
74
  this.deviceLogging = this.accessory.context.logging = this.device.logging;
77
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
78
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
75
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
76
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
79
77
  }
80
78
  } else if (this.platform.config.options?.logging) {
81
79
  this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
82
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
83
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
80
+ if (this.deviceLogging === 'debug' || this.deviceLogging === 'standard') {
81
+ this.warnLog(`Bot: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
84
82
  }
85
83
  } else {
86
84
  this.deviceLogging = this.accessory.context.logging = 'standard';
87
- if (this.platform.debugMode || (this.deviceLogging === 'debug')) {
88
- this.warnLog(`Water Heater: ${this.accessory.displayName} Using Device Standard Logging`);
89
- }
90
85
  }
91
86
  }
92
87