homebridge-mitsubishi-comfort 1.3.0 → 1.3.1

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.
package/dist/accessory.js CHANGED
@@ -229,34 +229,41 @@ class KumoThermostatAccessory {
229
229
  async setTargetHeatingCoolingState(value) {
230
230
  this.platform.log.debug('Set TargetHeatingCoolingState:', value);
231
231
  let operationMode;
232
+ let modeName;
232
233
  switch (value) {
233
234
  case this.platform.Characteristic.TargetHeatingCoolingState.OFF:
234
235
  operationMode = 'off';
236
+ modeName = 'OFF';
235
237
  break;
236
238
  case this.platform.Characteristic.TargetHeatingCoolingState.HEAT:
237
239
  operationMode = 'heat';
240
+ modeName = 'HEAT';
238
241
  break;
239
242
  case this.platform.Characteristic.TargetHeatingCoolingState.COOL:
240
243
  operationMode = 'cool';
244
+ modeName = 'COOL';
241
245
  break;
242
246
  case this.platform.Characteristic.TargetHeatingCoolingState.AUTO:
243
247
  operationMode = 'auto';
248
+ modeName = 'AUTO';
244
249
  break;
245
250
  default:
246
251
  this.platform.log.error('Unknown target heating cooling state:', value);
247
252
  return;
248
253
  }
254
+ this.platform.log.info(`[MODE CHANGE] ${this.accessory.displayName}: HomeKit sent ${modeName} mode`);
249
255
  const success = await this.kumoAPI.sendCommand(this.deviceSerial, {
250
256
  operationMode,
251
257
  });
252
258
  if (success) {
259
+ this.platform.log.info(`[MODE CHANGE] ${this.accessory.displayName}: Command accepted by API`);
253
260
  if (this.currentStatus) {
254
261
  this.currentStatus.operationMode = operationMode;
255
262
  this.currentStatus.power = operationMode === 'off' ? 0 : 1;
256
263
  }
257
264
  }
258
265
  else {
259
- this.platform.log.error(`Failed to set target heating cooling state for ${this.accessory.displayName}`);
266
+ this.platform.log.error(`[MODE CHANGE] ${this.accessory.displayName}: Failed to set mode to ${modeName}`);
260
267
  }
261
268
  }
262
269
  async getCurrentTemperature() {
package/dist/kumo-api.js CHANGED
@@ -214,9 +214,9 @@ class KumoAPI {
214
214
  }
215
215
  if (!response.ok) {
216
216
  this.log.error(`Request failed with status: ${response.status}`);
217
- if (this.debugMode) {
218
- const errorText = await response.text();
219
- this.log.info(` Error response: ${errorText}`);
217
+ const errorText = await response.text();
218
+ if (this.debugMode || response.status === 400) {
219
+ this.log.error(` Error response: ${errorText}`);
220
220
  }
221
221
  return null;
222
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-mitsubishi-comfort",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Homebridge plugin for Mitsubishi heat pumps using Kumo Cloud v3 API",
5
5
  "author": "burtherman",
6
6
  "main": "dist/index.js",