homebridge-melcloud-control 4.2.2-beta.7 → 4.2.2-beta.9

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/CHANGELOG.md CHANGED
@@ -22,6 +22,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
22
 
23
23
  - Do not use Homebridge UI > v5.5.0 because of break config.json
24
24
 
25
+ ## [4.2.2] - (xx.11.2025)
26
+
27
+ ## Changes
28
+
29
+ - added in standby mode sensor
30
+ - added connect sensor
31
+ - config schema updated
32
+ - readme updated
33
+ - cleanup
34
+
25
35
  ## [4.2.1] - (13.11.2025)
26
36
 
27
37
  ## Changes
package/README.md CHANGED
@@ -245,6 +245,8 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
245
245
  | `ataDevices[].autoDryFanMode` | Here select the operatiing mode for `Auto`, if this mode is not supported, it will be disabled.. |
246
246
  | `ataDevices[].temperatureSensor` | This enable extra `Room` temperature sensor to use with automations in HomeKit app. |
247
247
  | `ataDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensor to use with automations in HomeKit app. |
248
+ | `ataDevices[].inStandbySensor` | This enable `In Standby` sensor to use with automations in HomeKit app. |
249
+ | `ataDevices[].connectSensor` | This enable `Connect` sensor to use with automations in HomeKit app. |
248
250
  | `ataDevices[].errorSensor` | This enable `Error` sensor to use with automations in HomeKit app. |
249
251
  | `ataDevices[].frostProtectionSupport` | This enable extra `Frost Protectio` control and sensors to use with automations in HomeKit app. |
250
252
  | `ataDevices[].overheatProtectionSupport` | This enable extra `Overheat Protection` control and sensors to use with automations in HomeKit app. |
@@ -279,6 +281,8 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
279
281
  | `atwDevices[].temperatureReturnWaterTankSensor` | This enable extra `Return Water Tank` temperature sensor to use with automations in HomeKit app. |
280
282
  | `atwDevices[].temperatureFlowZone2Sensor` | This enable extra `Flow Zone 2` temperature sensor to use with automations in HomeKit app. |
281
283
  | `atwDevices[].temperatureReturnZone2Sensor` | This enable extra `Return Zone 2` temperature sensor to use with automations in HomeKit app. |
284
+ | `atwDevices[].inStandbySensor` | This enable `In Standby` sensor to use with automations in HomeKit app. |
285
+ | `atwDevices[].connectSensor` | This enable `Connect` sensor to use with automations in HomeKit app. |
282
286
  | `atwDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
283
287
  | `atwDevices[].holidayModeSupport` | This enable extra `Holiday Mode` control and sensors to use with automations in HomeKit app. |
284
288
  | `atwDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
@@ -304,6 +308,8 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
304
308
  | `ervDevices[].temperatureSensor` | This enable extra `Room` temperature sensor to use with automations in HomeKit app. |
305
309
  | `ervDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensor to use with automations in HomeKit app. |
306
310
  | `ervDevices[].temperatureSupplySensor` | This enable extra `Supply` temperature sensor to use with automations in HomeKit app. |
311
+ | `atwDevices[].inStandbySensor` | This enable `In Standby` sensor to use with automations in HomeKit app. |
312
+ | `ervDevices[].connectSensor` | This enable `Connect` sensor to use with automations in HomeKit app. |
307
313
  | `ervDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
308
314
  | `ervDevices[].holidayModeSupport` | This enable extra `Holiday Mode` control and sensors to use with automations in HomeKit app. |
309
315
  | `ervDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
@@ -395,6 +395,12 @@
395
395
  "default": false,
396
396
  "description": "This enable extra outdoor temperature sensor to use with automations in HomeKit app."
397
397
  },
398
+ "inStandbySensor": {
399
+ "title": "In Standby",
400
+ "type": "boolean",
401
+ "default": false,
402
+ "description": "This enable in standby mode sensor to use with automations in HomeKit app."
403
+ },
398
404
  "connectSensor": {
399
405
  "title": "Connect",
400
406
  "type": "boolean",
@@ -1113,6 +1119,12 @@
1113
1119
  "default": false,
1114
1120
  "description": "This enable extra Return Zone 2 temperature sensor to use with automations in HomeKit app."
1115
1121
  },
1122
+ "inStandbySensor": {
1123
+ "title": "In Standby",
1124
+ "type": "boolean",
1125
+ "default": false,
1126
+ "description": "This enable in standby mode sensor to use with automations in HomeKit app."
1127
+ },
1116
1128
  "connectSensor": {
1117
1129
  "title": "Connect",
1118
1130
  "type": "boolean",
@@ -1591,6 +1603,12 @@
1591
1603
  "default": false,
1592
1604
  "description": "This enable extra supply temperature sensor to use with automations in HomeKit app."
1593
1605
  },
1606
+ "inStandbySensor": {
1607
+ "title": "In Standby",
1608
+ "type": "boolean",
1609
+ "default": false,
1610
+ "description": "This enable in standby mode sensor to use with automations in HomeKit app."
1611
+ },
1594
1612
  "connectSensor": {
1595
1613
  "title": "Connect",
1596
1614
  "type": "boolean",
@@ -2239,6 +2257,7 @@
2239
2257
  {
2240
2258
  "title": "System",
2241
2259
  "items": [
2260
+ "accounts[].ataDevices[].inStandbySensor",
2242
2261
  "accounts[].ataDevices[].connectSensor",
2243
2262
  "accounts[].ataDevices[].errorSensor"
2244
2263
  ]
@@ -2391,6 +2410,7 @@
2391
2410
  {
2392
2411
  "title": "System",
2393
2412
  "items": [
2413
+ "accounts[].atwDevices[].inStandbySensor",
2394
2414
  "accounts[].atwDevices[].connectSensor",
2395
2415
  "accounts[].atwDevices[].errorSensor"
2396
2416
  ]
@@ -2536,6 +2556,7 @@
2536
2556
  {
2537
2557
  "title": "System",
2538
2558
  "items": [
2559
+ "accounts[].ervDevices[].inStandbySensor",
2539
2560
  "accounts[].ervDevices[].connectSensor",
2540
2561
  "accounts[].ervDevices[].errorSensor"
2541
2562
  ]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.2.2-beta.7",
4
+ "version": "4.2.2-beta.9",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/deviceata.js CHANGED
@@ -35,6 +35,7 @@ class DeviceAta extends EventEmitter {
35
35
  this.autoDryFanMode = device.autoDryFanMode || 1; //NONE, AUTO, DRY, FAN
36
36
  this.temperatureSensor = device.temperatureSensor || false;
37
37
  this.temperatureOutdoorSensor = device.temperatureOutdoorSensor || false;
38
+ this.inStandbySensor = device.inStandbySensor || false;
38
39
  this.connectSensor = device.connectSensor || false;
39
40
  this.errorSensor = device.errorSensor || false;
40
41
  this.frostProtectionSupport = device.frostProtectionSupport || false;
@@ -656,12 +657,26 @@ class DeviceAta extends EventEmitter {
656
657
  accessory.addService(this.outdoorTemperatureSensorService);
657
658
  };
658
659
 
660
+ //connect sensor
661
+ if (this.inStandbySensor && this.accessory.inStandbyMode !== null) {
662
+ if (this.logDebug) this.emit('debug', `Prepare in standby mode service`);
663
+ this.inStandbyService = new Service.ContactSensor(`${serviceName} In Standby`, `inStandbyService${deviceId}`);
664
+ this.inStandbyService.addOptionalCharacteristic(Characteristic.ConfiguredName);
665
+ this.inStandbyService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} In Standby`);
666
+ this.inStandbyService.getCharacteristic(Characteristic.ContactSensorState)
667
+ .onGet(async () => {
668
+ const state = this.accessory.isConnected;
669
+ return state;
670
+ })
671
+ accessory.addService(this.inStandbyService);
672
+ }
673
+
659
674
  //connect sensor
660
675
  if (this.connectSensor && this.accessory.isConnected !== null) {
661
- if (this.logDebug) this.emit('debug', `Prepare error service`);
662
- this.connectService = new Service.ContactSensor(`${serviceName} Connect`, `connectService${deviceId}`);
676
+ if (this.logDebug) this.emit('debug', `Prepare connect service`);
677
+ this.connectService = new Service.ContactSensor(`${serviceName} Connected`, `connectService${deviceId}`);
663
678
  this.connectService.addOptionalCharacteristic(Characteristic.ConfiguredName);
664
- this.connectService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Connect`);
679
+ this.connectService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Connected`);
665
680
  this.connectService.getCharacteristic(Characteristic.ContactSensorState)
666
681
  .onGet(async () => {
667
682
  const state = this.accessory.isConnected;
@@ -1233,6 +1248,7 @@ class DeviceAta extends EventEmitter {
1233
1248
  const supportHeatKey = accountTypeMelcloud ? 'ModelSupportsHeat' : 'HasHeatOperationMode';
1234
1249
  const supportDryKey = accountTypeMelcloud ? 'ModelSupportsDry' : 'HasDryOperationMode';
1235
1250
  const supportCoolKey = accountTypeMelcloud ? 'ModelSupportsCool' : 'HasCoolOperationMode';
1251
+ const supportStandbyKey = accountTypeMelcloud ? 'ModelSupportsStandbyMode' : 'HasStandby';
1236
1252
 
1237
1253
  //presets schedules
1238
1254
  const scheduleEnabled = deviceData.ScheduleEnabled;
@@ -1256,7 +1272,7 @@ class DeviceAta extends EventEmitter {
1256
1272
  const supportsAirDirectionFunction = deviceData.Device[supportAirDirectionKey];
1257
1273
  const supportsSwingFunction = deviceData.Device[supportSwingKey];
1258
1274
  const supportsWideVane = deviceData.Device[supportVideWaneKey];
1259
- const supportsOutdoorTemperature = deviceData.Device.HasOutdoorTemperature ?? false;
1275
+ const supportsOutdoorTemperature = deviceData.Device.HasOutdoorTemperature;
1260
1276
  const supportsFanSpeed = accountTypeMelcloud ? deviceData.Device.ModelSupportsFanSpeed : deviceData.Device.NumberOfFanSpeeds > 0;
1261
1277
  const supportsAuto1 = deviceData.Device[supportAutoKey];
1262
1278
  const supportsAuto = this.autoDryFanMode >= 1 && supportsAuto1
@@ -1266,6 +1282,7 @@ class DeviceAta extends EventEmitter {
1266
1282
  const supportsCool1 = deviceData.Device[supportCoolKey];
1267
1283
  const supportsCool = this.coolDryFanMode >= 1 && supportsCool1;
1268
1284
  const numberOfFanSpeeds = supportsFanSpeed ? deviceData.Device.NumberOfFanSpeeds : 0;
1285
+ const supportsStanbyMode = deviceData.Device[supportStandbyKey];
1269
1286
  const minTempHeat = 10;
1270
1287
  const maxTempHeat = 31;
1271
1288
  const minTempCoolDryAuto = 16;
@@ -1273,7 +1290,7 @@ class DeviceAta extends EventEmitter {
1273
1290
 
1274
1291
  //device state
1275
1292
  const power = deviceData.Device.Power ?? false;
1276
- const inStandbyMode = deviceData.Device.InStandbyMode ?? false;
1293
+ const inStandbyMode = deviceData.Device.InStandbyMode;
1277
1294
  const roomTemperature = deviceData.Device.RoomTemperature;
1278
1295
  const setTemperature = deviceData.Device.SetTemperature;
1279
1296
  const defaultHeatingSetTemperature = deviceData.Device.DefaultHeatingSetTemperature;
@@ -1309,6 +1326,7 @@ class DeviceAta extends EventEmitter {
1309
1326
  supportsHeat: supportsHeat,
1310
1327
  supportsDry: supportsDry,
1311
1328
  supportsCool: supportsCool,
1329
+ supportsStanbyMode: supportsStanbyMode,
1312
1330
  minTempHeat: minTempHeat,
1313
1331
  maxTempHeat: maxTempHeat,
1314
1332
  minTempCoolDryAuto: minTempCoolDryAuto,
@@ -1480,9 +1498,10 @@ class DeviceAta extends EventEmitter {
1480
1498
  };
1481
1499
  this.accessory = obj;
1482
1500
 
1483
- //senors
1501
+ //other sensors
1484
1502
  this.roomTemperatureSensorService?.updateCharacteristic(Characteristic.CurrentTemperature, roomTemperature);
1485
1503
  this.outdoorTemperatureSensorService?.updateCharacteristic(Characteristic.CurrentTemperature, outdoorTemperature);
1504
+ this.inStandbyService?.updateCharacteristic(Characteristic.ContactSensorState, inStandbyMode);
1486
1505
  this.connectService?.updateCharacteristic(Characteristic.ContactSensorState, isConnected);
1487
1506
  this.errorService?.updateCharacteristic(Characteristic.ContactSensorState, isInError);
1488
1507
 
package/src/deviceatw.js CHANGED
@@ -37,6 +37,7 @@ class DeviceAtw extends EventEmitter {
37
37
  this.temperatureReturnWaterTankSensor = device.temperatureReturnWaterTankSensor || false;
38
38
  this.temperatureFlowZone2Sensor = device.temperatureFlowZone2Sensor || false;
39
39
  this.temperatureReturnZone2Sensor = device.temperatureReturnZone2Sensor || false;
40
+ this.inStandbySensor = device.inStandbySensor || false;
40
41
  this.connectSensor = device.connectSensor || false;
41
42
  this.errorSensor = device.errorSensor || false;
42
43
  this.holidayModeSupport = device.holidayModeSupport || false;
@@ -1069,12 +1070,25 @@ class DeviceAtw extends EventEmitter {
1069
1070
  });
1070
1071
  };
1071
1072
 
1073
+ if (this.inStandbySensor && this.accessory.inStandbyMode !== null) {
1074
+ if (this.logDebug) this.emit('debug', `Prepare in standby mode service`);
1075
+ this.inStandbyService = new Service.ContactSensor(`${serviceName} In Standby`, `inStandbyService${deviceId}`);
1076
+ this.inStandbyService.addOptionalCharacteristic(Characteristic.ConfiguredName);
1077
+ this.inStandbyService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} In Standby`);
1078
+ this.inStandbyService.getCharacteristic(Characteristic.ContactSensorState)
1079
+ .onGet(async () => {
1080
+ const state = this.accessory.isConnected;
1081
+ return state;
1082
+ })
1083
+ accessory.addService(this.inStandbyService);
1084
+ }
1085
+
1072
1086
  //connect sensor
1073
1087
  if (this.connectSensor && this.accessory.isConnected !== null) {
1074
- if (this.logDebug) this.emit('debug', `Prepare error service`);
1075
- this.connectService = new Service.ContactSensor(`${serviceName} Connect`, `connectService${deviceId}`);
1088
+ if (this.logDebug) this.emit('debug', `Prepare connect service`);
1089
+ this.connectService = new Service.ContactSensor(`${serviceName} Connected`, `connectService${deviceId}`);
1076
1090
  this.connectService.addOptionalCharacteristic(Characteristic.ConfiguredName);
1077
- this.connectService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Connect`);
1091
+ this.connectService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Connected`);
1078
1092
  this.connectService.getCharacteristic(Characteristic.ContactSensorState)
1079
1093
  .onGet(async () => {
1080
1094
  const state = this.accessory.isConnected;
@@ -1457,7 +1471,7 @@ class DeviceAtw extends EventEmitter {
1457
1471
  try {
1458
1472
  //melcloud device
1459
1473
  this.melCloudAtw = new MelCloudAtw(this.account, this.device, this.devicesFile, this.defaultTempsFile)
1460
- .on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion, hasHotWaterTank, hasZone2) => {
1474
+ .on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion, supportsHotWaterTank, supportsZone2) => {
1461
1475
  if (this.logDeviceInfo && this.displayDeviceInfo) {
1462
1476
  this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
1463
1477
  this.emit('devInfo', `Account: ${this.accountName}`);
@@ -1468,8 +1482,8 @@ class DeviceAtw extends EventEmitter {
1468
1482
  this.emit('devInfo', `Manufacturer: ${manufacturer}`);
1469
1483
  this.emit('devInfo', '----------------------------------');
1470
1484
  this.emit('devInfo', `Zone 1: Yes`);
1471
- this.emit('devInfo', `Hot Water Tank: ${hasHotWaterTank ? 'Yes' : 'No'}`);
1472
- this.emit('devInfo', `Zone 2: ${hasZone2 ? 'Yes' : 'No'}`);
1485
+ this.emit('devInfo', `Hot Water Tank: ${supportsHotWaterTank ? 'Yes' : 'No'}`);
1486
+ this.emit('devInfo', `Zone 2: ${supportsZone2 ? 'Yes' : 'No'}`);
1473
1487
  this.emit('devInfo', '----------------------------------');
1474
1488
  this.displayDeviceInfo = false;
1475
1489
  }
@@ -1490,6 +1504,7 @@ class DeviceAtw extends EventEmitter {
1490
1504
  const tempStepKey = this.accountType === 'melcloud' ? 'TemperatureIncrement' : 'HasHalfDegreeIncrements';
1491
1505
  const connectKey = this.accountType === 'melcloud' ? 'Offline' : 'IsConnected';
1492
1506
  const errorKey = this.accountType === 'melcloud' ? 'HasError' : 'IsInError';
1507
+ const supportStandbyKey = accountTypeMelcloud ? 'ModelSupportsStandbyMode' : 'HasStandby';
1493
1508
 
1494
1509
  //presets schedule
1495
1510
  const scheduleEnabled = deviceData.ScheduleEnabled;
@@ -1499,10 +1514,10 @@ class DeviceAtw extends EventEmitter {
1499
1514
  const holidayModeActive = deviceData.HolidayMode?.Active ?? false;
1500
1515
 
1501
1516
  //device info
1502
- const hasHeatPump = ![1, 2, 3, 4, 5, 6, 7, 15].includes(this.hideZone);
1503
- const hasZone1 = ![2, 3, 4, 8, 9, 10, 11, 15].includes(this.hideZone);
1504
- const hasHotWaterTank = ![3, 5, 6, 9, 10, 12, 13, 15].includes(this.hideZone) && deviceData.Device.HasHotWaterTank;
1505
- const hasZone2 = ![4, 6, 7, 10, 11, 13, 14, 15].includes(this.hideZone) && deviceData.Device.HasZone2;
1517
+ const supportsHeatPump = ![1, 2, 3, 4, 5, 6, 7, 15].includes(this.hideZone);
1518
+ const supportsZone1 = ![2, 3, 4, 8, 9, 10, 11, 15].includes(this.hideZone);
1519
+ const supportsHotWaterTank = ![3, 5, 6, 9, 10, 12, 13, 15].includes(this.hideZone) && deviceData.Device.HasHotWaterTank;
1520
+ const supportsZone2 = ![4, 6, 7, 10, 11, 13, 14, 15].includes(this.hideZone) && deviceData.Device.HasZone2;
1506
1521
  const canHeat = deviceData.Device.CanHeat ?? false;
1507
1522
  const canCool = deviceData.Device.CanCool ?? false;
1508
1523
  const heatCoolModes = canHeat && canCool ? 0 : canHeat ? 1 : canCool ? 2 : 3;
@@ -1510,13 +1525,14 @@ class DeviceAtw extends EventEmitter {
1510
1525
  const minSetTemperature = deviceData.Device.MinSetTemperature ?? 10;
1511
1526
  const maxSetTemperature = deviceData.Device.MaxSetTemperature ?? 30;
1512
1527
  const maxTankTemperature = deviceData.Device.MaxTankTemperature ?? 70;
1528
+ const supportsStanbyMode = deviceData.Device[supportStandbyKey];
1513
1529
 
1514
1530
  //zones
1515
1531
  let currentZoneCase = 0;
1516
- const caseHeatPump = hasHeatPump ? currentZoneCase++ : -1;
1517
- const caseZone1 = hasZone1 ? currentZoneCase++ : -1;
1518
- const caseHotWater = hasHotWaterTank ? currentZoneCase++ : -1;
1519
- const caseZone2 = hasZone2 ? currentZoneCase++ : -1;
1532
+ const caseHeatPump = supportsHeatPump ? currentZoneCase++ : -1;
1533
+ const caseZone1 = supportsZone1 ? currentZoneCase++ : -1;
1534
+ const caseHotWater = supportsHotWaterTank ? currentZoneCase++ : -1;
1535
+ const caseZone2 = supportsZone2 ? currentZoneCase++ : -1;
1520
1536
  const zonesCount = currentZoneCase;
1521
1537
 
1522
1538
  //zones sensors
@@ -1582,11 +1598,12 @@ class DeviceAtw extends EventEmitter {
1582
1598
  idleZone1: idleZone1,
1583
1599
  idleZone2: idleZone2,
1584
1600
  temperatureIncrement: temperatureIncrement,
1585
- hasHeatPump: hasHeatPump,
1586
- hasZone1: hasZone1,
1587
- hasHotWaterTank: hasHotWaterTank,
1588
- hasZone2: hasZone2,
1601
+ supportsHeatPump: supportsHeatPump,
1602
+ supportsZone1: supportsZone1,
1603
+ supportsHotWaterTank: supportsHotWaterTank,
1604
+ supportsZone2: supportsZone2,
1589
1605
  heatCoolModes: heatCoolModes,
1606
+ supportsStanbyMode: supportsStanbyMode,
1590
1607
  caseHeatPump: caseHeatPump,
1591
1608
  caseZone1: caseZone1,
1592
1609
  caseHotWater: caseHotWater,
@@ -1637,7 +1654,7 @@ class DeviceAtw extends EventEmitter {
1637
1654
  roomTemperature = outdoorTemperature;
1638
1655
  setTemperature = outdoorTemperature;
1639
1656
 
1640
- lockPhysicalControl = hasHotWaterTank && hasZone2 ? (prohibitZone1 && prohibitHotWater && prohibitZone2 ? 1 : 0) : hasHotWaterTank ? (prohibitZone1 && prohibitHotWater ? 1 : 0) : hasZone2 ? (prohibitZone1 && prohibitZone2 ? 1 : 0) : 0;
1657
+ lockPhysicalControl = supportsHotWaterTank && supportsZone2 ? (prohibitZone1 && prohibitHotWater && prohibitZone2 ? 1 : 0) : supportsHotWaterTank ? (prohibitZone1 && prohibitHotWater ? 1 : 0) : supportsZone2 ? (prohibitZone1 && prohibitZone2 ? 1 : 0) : 0;
1641
1658
  operationModeSetPropsMinValue = [1, 1, 2, 0][heatCoolModes];
1642
1659
  operationModeSetPropsMaxValue = [2, 1, 2, 0][heatCoolModes];
1643
1660
  operationModeSetPropsValidValues = [[1, 2], [1], [2], [0]][heatCoolModes];
@@ -1981,7 +1998,8 @@ class DeviceAtw extends EventEmitter {
1981
1998
  };
1982
1999
  this.accessory = obj;
1983
2000
 
1984
- //error sensor
2001
+ //other sensors
2002
+ this.inStandbyService?.updateCharacteristic(Characteristic.ContactSensorState, inStandbyMode);
1985
2003
  this.connectService?.updateCharacteristic(Characteristic.ContactSensorState, isConnected);
1986
2004
  this.errorService?.updateCharacteristic(Characteristic.ContactSensorState, isInError);
1987
2005
 
package/src/deviceerv.js CHANGED
@@ -30,6 +30,7 @@ class DeviceErv extends EventEmitter {
30
30
  this.temperatureSensor = device.temperatureSensor || false;
31
31
  this.temperatureOutdoorSensor = device.temperatureOutdoorSensor || false;
32
32
  this.temperatureSupplySensor = device.temperatureSupplySensor || false;
33
+ this.inStandbySensor = device.inStandbySensor || false;
33
34
  this.connectSensor = device.connectSensor || false;
34
35
  this.errorSensor = device.errorSensor || false;
35
36
  this.holidayModeSupport = device.holidayModeSupport || false;
@@ -262,16 +263,16 @@ class DeviceErv extends EventEmitter {
262
263
  const accountName = this.accountName;
263
264
  const presetsOnServer = this.accessory.presets;
264
265
  const schedulesOnServer = this.accessory.schedules;
265
- const hasRoomTemperature = this.accessory.hasRoomTemperature;
266
- const hasSupplyTemperature = this.accessory.hasSupplyTemperature;
267
- const hasOutdoorTemperature = this.accessory.hasOutdoorTemperature;
268
- const hasCoolOperationMode = this.accessory.hasCoolOperationMode;
269
- const hasHeatOperationMode = this.accessory.hasHeatOperationMode;
270
- const hasAutoVentilationMode = this.accessory.hasAutoVentilationMode;
271
- const hasBypassVentilationMode = this.accessory.hasBypassVentilationMode;
272
- const hasAutomaticFanSpeed = this.accessory.hasAutomaticFanSpeed;
273
- const hasCO2Sensor = this.accessory.hasCO2Sensor;
274
- const hasPM25Sensor = this.accessory.hasPM25Sensor;
266
+ const supportsRoomTemperature = this.accessory.supportsRoomTemperature;
267
+ const supportsSupplyTemperature = this.accessory.supportsSupplyTemperature;
268
+ const supportsOutdoorTemperature = this.accessory.supportsOutdoorTemperature;
269
+ const supportsCoolOperationMode = this.accessory.supportsCoolOperationMode;
270
+ const supportsHeatOperationMode = this.accessory.supportsHeatOperationMode;
271
+ const supportsAutoVentilationMode = this.accessory.supportsAutoVentilationMode;
272
+ const supportsBypassVentilationMode = this.accessory.supportsBypassVentilationMode;
273
+ const supportsAutomaticFanSpeed = this.accessory.supportsAutomaticFanSpeed;
274
+ const supportsCO2Sensor = this.accessory.supportsCO2Sensor;
275
+ const supportsPM25Sensor = this.accessory.supportsPM25Sensor;
275
276
  const numberOfFanSpeeds = this.accessory.numberOfFanSpeeds;
276
277
 
277
278
  //accessory
@@ -332,13 +333,13 @@ class DeviceErv extends EventEmitter {
332
333
  try {
333
334
  switch (value) {
334
335
  case 0: //AUTO - AUTO
335
- deviceData.Device.VentilationMode = hasAutoVentilationMode ? 2 : 0;
336
+ deviceData.Device.VentilationMode = supportsAutoVentilationMode ? 2 : 0;
336
337
  break;
337
338
  case 1: //HEAT - LOSSNAY
338
339
  deviceData.Device.VentilationMode = 0;
339
340
  break;
340
341
  case 2: //COOL - BYPASS
341
- deviceData.Device.VentilationMode = hasBypassVentilationMode ? 1 : 0;
342
+ deviceData.Device.VentilationMode = supportsBypassVentilationMode ? 1 : 0;
342
343
  break;
343
344
  };
344
345
 
@@ -368,16 +369,16 @@ class DeviceErv extends EventEmitter {
368
369
  try {
369
370
  switch (numberOfFanSpeeds) {
370
371
  case 2: //Fan speed mode 2
371
- value = hasAutomaticFanSpeed ? [0, 1, 2, 0][value] : [1, 1, 2][value];
372
+ value = supportsAutomaticFanSpeed ? [0, 1, 2, 0][value] : [1, 1, 2][value];
372
373
  break;
373
374
  case 3: //Fan speed mode 3
374
- value = hasAutomaticFanSpeed ? [0, 1, 2, 3, 0][value] : [1, 1, 2, 3][value];
375
+ value = supportsAutomaticFanSpeed ? [0, 1, 2, 3, 0][value] : [1, 1, 2, 3][value];
375
376
  break;
376
377
  case 4: //Fan speed mode 4
377
- value = hasAutomaticFanSpeed ? [0, 1, 2, 3, 4, 0][value] : [1, 1, 2, 3, 4][value];
378
+ value = supportsAutomaticFanSpeed ? [0, 1, 2, 3, 4, 0][value] : [1, 1, 2, 3, 4][value];
378
379
  break;
379
380
  case 5: //Fan speed mode 5
380
- value = hasAutomaticFanSpeed ? [0, 1, 2, 3, 4, 5, 0][value] : [1, 1, 2, 3, 4, 5][value];
381
+ value = supportsAutomaticFanSpeed ? [0, 1, 2, 3, 4, 5, 0][value] : [1, 1, 2, 3, 4, 5][value];
381
382
  break;;
382
383
  };
383
384
 
@@ -389,7 +390,7 @@ class DeviceErv extends EventEmitter {
389
390
  };
390
391
  });
391
392
  //device can cool
392
- if (hasAutoVentilationMode && hasCoolOperationMode) {
393
+ if (supportsAutoVentilationMode && supportsCoolOperationMode) {
393
394
  this.melCloudService.getCharacteristic(Characteristic.CoolingThresholdTemperature)
394
395
  .setProps({
395
396
  minValue: this.accessory.minTempCoolDry,
@@ -411,7 +412,7 @@ class DeviceErv extends EventEmitter {
411
412
  });
412
413
  };
413
414
  //device can heat
414
- if (hasAutoVentilationMode && hasHeatOperationMode) {
415
+ if (supportsAutoVentilationMode && supportsHeatOperationMode) {
415
416
  this.melCloudService.getCharacteristic(Characteristic.HeatingThresholdTemperature)
416
417
  .setProps({
417
418
  minValue: this.accessory.minTempHeat,
@@ -501,12 +502,12 @@ class DeviceErv extends EventEmitter {
501
502
  break;
502
503
  case 2: //COOL - BYPASS
503
504
  deviceData.Device.Power = true;
504
- deviceData.Device.VentilationMode = hasBypassVentilationMode ? 1 : 0;
505
+ deviceData.Device.VentilationMode = supportsBypassVentilationMode ? 1 : 0;
505
506
  effectiveFlags = Ventilation.EffectiveFlags.Power + Ventilation.EffectiveFlags.VentilationMode;
506
507
  break;
507
508
  case 3: //AUTO - AUTO
508
509
  deviceData.Device.Power = true;
509
- deviceData.Device.VentilationMode = hasAutoVentilationMode ? 2 : 0;
510
+ deviceData.Device.VentilationMode = supportsAutoVentilationMode ? 2 : 0;
510
511
  effectiveFlags = Ventilation.EffectiveFlags.Power + Ventilation.EffectiveFlags.VentilationMode;
511
512
  break;
512
513
  };
@@ -564,7 +565,7 @@ class DeviceErv extends EventEmitter {
564
565
  };
565
566
 
566
567
  //temperature sensor service room
567
- if (this.temperatureSensor && hasRoomTemperature && this.accessory.roomTemperature !== null) {
568
+ if (this.temperatureSensor && supportsRoomTemperature && this.accessory.roomTemperature !== null) {
568
569
  if (this.logDebug) this.emit('debug', `Prepare room temperature sensor service`);
569
570
  this.roomTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Room`, `Room Temperature Sensor ${deviceId}`);
570
571
  this.roomTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
@@ -583,7 +584,7 @@ class DeviceErv extends EventEmitter {
583
584
  };
584
585
 
585
586
  //temperature sensor service supply
586
- if (this.temperatureSupplySensor && hasSupplyTemperature && this.accessory.supplyTemperature !== null) {
587
+ if (this.temperatureSupplySensor && supportsSupplyTemperature && this.accessory.supplyTemperature !== null) {
587
588
  if (this.logDebug) this.emit('debug', `Prepare supply temperature sensor service`);
588
589
  this.supplyTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Supply`, `Supply Temperature Sensor ${deviceId}`);
589
590
  this.supplyTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
@@ -602,7 +603,7 @@ class DeviceErv extends EventEmitter {
602
603
  };
603
604
 
604
605
  //temperature sensor service outdoor
605
- if (this.temperatureOutdoorSensor && hasOutdoorTemperature && this.accessory.outdoorTemperature !== null) {
606
+ if (this.temperatureOutdoorSensor && supportsOutdoorTemperature && this.accessory.outdoorTemperature !== null) {
606
607
  if (this.logDebug) this.emit('debug', `Prepare outdoor temperature sensor service`);
607
608
  this.outdoorTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Outdoor`, `Outdoor Temperature Sensor ${deviceId}`);
608
609
  this.outdoorTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
@@ -653,7 +654,7 @@ class DeviceErv extends EventEmitter {
653
654
  }
654
655
 
655
656
  //room CO2 sensor
656
- if (hasCO2Sensor) {
657
+ if (supportsCO2Sensor) {
657
658
  this.carbonDioxideSensorService = new Service.CarbonDioxideSensor(`${serviceName} CO2 Sensor`, `CO2Sensor ${deviceId}`);
658
659
  this.carbonDioxideSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
659
660
  this.carbonDioxideSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} CO2 Sensor`);
@@ -671,7 +672,7 @@ class DeviceErv extends EventEmitter {
671
672
  }
672
673
 
673
674
  //room PM2.5 sensor
674
- if (hasPM25Sensor) {
675
+ if (supportsPM25Sensor) {
675
676
  this.airQualitySensorService = new Service.AirQualitySensor(`${serviceName} PM2.5 Sensor`, `PM25Sensor ${deviceId}`);
676
677
  this.airQualitySensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
677
678
  this.airQualitySensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} PM2.5 Sensor`);
@@ -688,12 +689,25 @@ class DeviceErv extends EventEmitter {
688
689
  accessory.addService(this.airQualitySensorService);
689
690
  }
690
691
 
692
+ if (this.inStandbySensor && this.accessory.inStandbyMode !== null) {
693
+ if (this.logDebug) this.emit('debug', `Prepare in standby mode service`);
694
+ this.inStandbyService = new Service.ContactSensor(`${serviceName} In Standby`, `inStandbyService${deviceId}`);
695
+ this.inStandbyService.addOptionalCharacteristic(Characteristic.ConfiguredName);
696
+ this.inStandbyService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} In Standby`);
697
+ this.inStandbyService.getCharacteristic(Characteristic.ContactSensorState)
698
+ .onGet(async () => {
699
+ const state = this.accessory.isConnected;
700
+ return state;
701
+ })
702
+ accessory.addService(this.inStandbyService);
703
+ }
704
+
691
705
  //connect sensor
692
706
  if (this.connectSensor && this.accessory.isConnected !== null) {
693
- if (this.logDebug) this.emit('debug', `Prepare error service`);
694
- this.connectService = new Service.ContactSensor(`${serviceName} Connect`, `connectService${deviceId}`);
707
+ if (this.logDebug) this.emit('debug', `Prepare connect service`);
708
+ this.connectService = new Service.ContactSensor(`${serviceName} Connected`, `connectService${deviceId}`);
695
709
  this.connectService.addOptionalCharacteristic(Characteristic.ConfiguredName);
696
- this.connectService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Connect`);
710
+ this.connectService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Connected`);
697
711
  this.connectService.getCharacteristic(Characteristic.ContactSensorState)
698
712
  .onGet(async () => {
699
713
  const state = this.accessory.isConnected;
@@ -1035,6 +1049,7 @@ class DeviceErv extends EventEmitter {
1035
1049
  const tempStepKey = this.accountType === 'melcloud' ? 'TemperatureIncrement' : 'HasHalfDegreeIncrements';
1036
1050
  const connectKey = this.accountType === 'melcloud' ? 'Offline' : 'IsConnected';
1037
1051
  const errorKey = this.accountType === 'melcloud' ? 'HasError' : 'IsInError';
1052
+ const supportStandbyKey = accountTypeMelcloud ? 'ModelSupportsStandbyMode' : 'HasStandby';
1038
1053
 
1039
1054
  //presets schedule
1040
1055
  const scheduleEnabled = deviceData.ScheduleEnabled;
@@ -1049,22 +1064,23 @@ class DeviceErv extends EventEmitter {
1049
1064
  const hideOutdoorTemperature = deviceData.HideOutdoorTemperature;
1050
1065
 
1051
1066
  //device info
1052
- const hasCoolOperationMode = deviceData.Device.HasCoolOperationMode ?? false;
1053
- const hasHeatOperationMode = deviceData.Device.HasHeatOperationMode ?? false;
1054
- const hasAutoOperationMode = deviceData.Device.HasAutoOperationMode ?? false;
1055
- const hasRoomTemperature = deviceData.Device.HasRoomTemperature ?? false;
1056
- const hasSupplyTemperature = deviceData.Device.HasSupplyTemperature ?? false;
1057
- const hasOutdoorTemperature = deviceData.Device.HasOutdoorTemperature ?? false;
1058
- const hasCO2Sensor = deviceData.Device.HasCO2Sensor ?? false;
1067
+ const supportsCoolOperationMode = deviceData.Device.HasCoolOperationMode ?? false;
1068
+ const supportsHeatOperationMode = deviceData.Device.HasHeatOperationMode ?? false;
1069
+ const supportsAutoOperationMode = deviceData.Device.HasAutoOperationMode ?? false;
1070
+ const supportsRoomTemperature = deviceData.Device.HasRoomTemperature ?? false;
1071
+ const supportsSupplyTemperature = deviceData.Device.HasSupplyTemperature ?? false;
1072
+ const supportsOutdoorTemperature = deviceData.Device.HasOutdoorTemperature ?? false;
1073
+ const supportsCO2Sensor = deviceData.Device.HasCO2Sensor ?? false;
1074
+ const supportsStanbyMode = deviceData.Device[supportStandbyKey];
1059
1075
  const roomCO2Level = deviceData.Device.RoomCO2Level ?? false;
1060
- const roomCO2Detected = hasCO2Sensor && roomCO2Level > 1000 ? true : false;
1061
- const hasPM25Sensor = deviceData.Device.HasPM25Sensor ?? false;
1062
- const pM25SensorStatus = hasPM25Sensor ? deviceData.Device.PM25SensorStatus : 0;
1063
- const pM25Level = hasPM25Sensor ? deviceData.Device.PM25Level : 0;
1064
- const pM25AirQuality = hasPM25Sensor ? pM25Level <= 13 ? 1 : pM25Level <= 35 ? 2 : pM25Level <= 55 ? 3 : pM25Level <= 75 ? 4 : pM25Level <= 110 ? 5 : 0 : 0;
1065
- const hasAutoVentilationMode = deviceData.Device.HasAutoVentilationMode ?? false;
1066
- const hasBypassVentilationMode = deviceData.Device.HasBypassVentilationMode ?? false;
1067
- const hasAutomaticFanSpeed = deviceData.Device.HasAutomaticFanSpeed ?? false;
1076
+ const roomCO2Detected = supportsCO2Sensor && roomCO2Level > 1000 ? true : false;
1077
+ const supportsPM25Sensor = deviceData.Device.HasPM25Sensor ?? false;
1078
+ const pM25SensorStatus = supportsPM25Sensor ? deviceData.Device.PM25SensorStatus : 0;
1079
+ const pM25Level = supportsPM25Sensor ? deviceData.Device.PM25Level : 0;
1080
+ const pM25AirQuality = supportsPM25Sensor ? pM25Level <= 13 ? 1 : pM25Level <= 35 ? 2 : pM25Level <= 55 ? 3 : pM25Level <= 75 ? 4 : pM25Level <= 110 ? 5 : 0 : 0;
1081
+ const supportsAutoVentilationMode = deviceData.Device.HasAutoVentilationMode ?? false;
1082
+ const supportsBypassVentilationMode = deviceData.Device.HasBypassVentilationMode ?? false;
1083
+ const supportsAutomaticFanSpeed = deviceData.Device.HasAutomaticFanSpeed ?? false;
1068
1084
  const coreMaintenanceRequired = deviceData.Device.CoreMaintenanceRequired;
1069
1085
  const filterMaintenanceRequired = deviceData.Device.FilterMaintenanceRequired;
1070
1086
  const actualVentilationMode = deviceData.Device.ActualVentilationMode;
@@ -1094,21 +1110,22 @@ class DeviceErv extends EventEmitter {
1094
1110
  const obj = {
1095
1111
  presets: presetsOnServer,
1096
1112
  schedules: schedulesOnServer,
1097
- hasRoomTemperature: hasRoomTemperature,
1098
- hasSupplyTemperature: hasSupplyTemperature,
1099
- hasOutdoorTemperature: hasOutdoorTemperature,
1100
- hasCoolOperationMode: hasCoolOperationMode,
1101
- hasHeatOperationMode: hasHeatOperationMode,
1102
- hasCO2Sensor: hasCO2Sensor,
1113
+ supportsRoomTemperature: supportsRoomTemperature,
1114
+ supportsSupplyTemperature: supportsSupplyTemperature,
1115
+ supportsOutdoorTemperature: supportsOutdoorTemperature,
1116
+ supportsCoolOperationMode: supportsCoolOperationMode,
1117
+ supportsHeatOperationMode: supportsHeatOperationMode,
1118
+ supportsCO2Sensor: supportsCO2Sensor,
1103
1119
  roomCO2Level: roomCO2Level,
1104
1120
  roomCO2Detected: roomCO2Detected,
1105
- hasPM25Sensor: hasPM25Sensor,
1121
+ supportsPM25Sensor: supportsPM25Sensor,
1106
1122
  pM25SensorStatus: pM25SensorStatus,
1107
1123
  pM25Level: pM25Level,
1108
1124
  pM25AirQuality: pM25AirQuality,
1109
- hasAutoVentilationMode: hasAutoVentilationMode,
1110
- hasBypassVentilationMode: hasBypassVentilationMode,
1111
- hasAutomaticFanSpeed: hasAutomaticFanSpeed,
1125
+ supportsAutoVentilationMode: supportsAutoVentilationMode,
1126
+ supportsBypassVentilationMode: supportsBypassVentilationMode,
1127
+ supportsAutomaticFanSpeed: supportsAutomaticFanSpeed,
1128
+ supportsStanbyMode: supportsStanbyMode,
1112
1129
  coreMaintenanceRequired: coreMaintenanceRequired,
1113
1130
  filterMaintenanceRequired: filterMaintenanceRequired,
1114
1131
  actualVentilationMode: actualVentilationMode,
@@ -1173,24 +1190,24 @@ class DeviceErv extends EventEmitter {
1173
1190
 
1174
1191
  obj.currentOperationMode = !power ? 0 : obj.currentOperationMode;
1175
1192
  obj.targetOperationMode = obj.targetOperationMode;
1176
- obj.operationModeSetPropsMinValue = hasAutoVentilationMode ? 0 : 1;
1177
- obj.operationModeSetPropsMaxValue = hasAutoVentilationMode ? 2 : 2;
1178
- obj.operationModeSetPropsValidValues = hasAutoVentilationMode ? (hasBypassVentilationMode ? [0, 1, 2] : [0, 2]) : (hasBypassVentilationMode ? [1, 2] : [2]);
1193
+ obj.operationModeSetPropsMinValue = supportsAutoVentilationMode ? 0 : 1;
1194
+ obj.operationModeSetPropsMaxValue = supportsAutoVentilationMode ? 2 : 2;
1195
+ obj.operationModeSetPropsValidValues = supportsAutoVentilationMode ? (supportsBypassVentilationMode ? [0, 1, 2] : [0, 2]) : (supportsBypassVentilationMode ? [1, 2] : [2]);
1179
1196
 
1180
1197
  //fan speed mode
1181
1198
  obj.fanSpeedSetPropsMaxValue = 2;
1182
1199
  switch (numberOfFanSpeeds) {
1183
1200
  case 2: //Fan speed mode 2
1184
- obj.fanSpeed = hasAutomaticFanSpeed ? [3, 1, 2][setFanSpeed] : [0, 1, 2][setFanSpeed];
1185
- obj.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 3 : 2;
1201
+ obj.fanSpeed = supportsAutomaticFanSpeed ? [3, 1, 2][setFanSpeed] : [0, 1, 2][setFanSpeed];
1202
+ obj.fanSpeedSetPropsMaxValue = supportsAutomaticFanSpeed ? 3 : 2;
1186
1203
  break;
1187
1204
  case 3: //Fan speed mode 3
1188
- this.obj.fanSpeed = hasAutomaticFanSpeed ? [4, 1, 2, 3][setFanSpeed] : [0, 1, 2, 3][setFanSpeed];
1189
- obj.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 4 : 3;
1205
+ this.obj.fanSpeed = supportsAutomaticFanSpeed ? [4, 1, 2, 3][setFanSpeed] : [0, 1, 2, 3][setFanSpeed];
1206
+ obj.fanSpeedSetPropsMaxValue = supportsAutomaticFanSpeed ? 4 : 3;
1190
1207
  break;
1191
1208
  case 4: //Fan speed mode 4
1192
- obj.fanSpeed = hasAutomaticFanSpeed ? [5, 1, 2, 3, 4][setFanSpeed] : [0, 1, 2, 3, 4][setFanSpeed];
1193
- obj.fanSpeedSetPropsMaxValue = hasAutomaticFanSpeed ? 5 : 4;
1209
+ obj.fanSpeed = supportsAutomaticFanSpeed ? [5, 1, 2, 3, 4][setFanSpeed] : [0, 1, 2, 3, 4][setFanSpeed];
1210
+ obj.fanSpeedSetPropsMaxValue = supportsAutomaticFanSpeed ? 5 : 4;
1194
1211
  break;
1195
1212
  };
1196
1213
 
@@ -1203,8 +1220,8 @@ class DeviceErv extends EventEmitter {
1203
1220
  .updateCharacteristic(Characteristic.RotationSpeed, obj.fanSpeed)
1204
1221
  .updateCharacteristic(Characteristic.LockPhysicalControls, obj.lockPhysicalControl)
1205
1222
  .updateCharacteristic(Characteristic.TemperatureDisplayUnits, obj.useFahrenheit);
1206
- const updateDefCool = hasCoolOperationMode ? this.melCloudService?.updateCharacteristic(Characteristic.CoolingThresholdTemperature, defaultCoolingSetTemperature) : false;
1207
- const updateDefHeat = hasHeatOperationMode ? this.melCloudService?.updateCharacteristic(Characteristic.HeatingThresholdTemperature, defaultHeatingSetTemperature) : false;
1223
+ const updateDefCool = supportsCoolOperationMode ? this.melCloudService?.updateCharacteristic(Characteristic.CoolingThresholdTemperature, defaultCoolingSetTemperature) : false;
1224
+ const updateDefHeat = supportsHeatOperationMode ? this.melCloudService?.updateCharacteristic(Characteristic.HeatingThresholdTemperature, defaultHeatingSetTemperature) : false;
1208
1225
  break;
1209
1226
  case 2: //Thermostat
1210
1227
  //operation mode - 0, HEAT, 2, COOL, 4, 5, 6, FAN, AUTO
@@ -1238,9 +1255,9 @@ class DeviceErv extends EventEmitter {
1238
1255
 
1239
1256
  obj.currentOperationMode = !power ? 0 : obj.currentOperationMode;
1240
1257
  obj.targetOperationMode = !power ? 0 : obj.targetOperationMode;
1241
- obj.operationModeSetPropsMinValue = hasAutoVentilationMode ? 0 : 0;
1242
- obj.operationModeSetPropsMaxValue = hasAutoVentilationMode ? 3 : 2;
1243
- obj.operationModeSetPropsValidValues = hasAutoVentilationMode ? (hasBypassVentilationMode ? [0, 1, 2, 3] : [0, 2, 3]) : (hasBypassVentilationMode ? [0, 1, 2] : [0, 2]);
1258
+ obj.operationModeSetPropsMinValue = supportsAutoVentilationMode ? 0 : 0;
1259
+ obj.operationModeSetPropsMaxValue = supportsAutoVentilationMode ? 3 : 2;
1260
+ obj.operationModeSetPropsValidValues = supportsAutoVentilationMode ? (supportsBypassVentilationMode ? [0, 1, 2, 3] : [0, 2, 3]) : (supportsBypassVentilationMode ? [0, 1, 2] : [0, 2]);
1244
1261
 
1245
1262
  //update characteristics
1246
1263
  this.melCloudService
@@ -1274,7 +1291,8 @@ class DeviceErv extends EventEmitter {
1274
1291
  ?.updateCharacteristic(Characteristic.AirQuality, pM25AirQuality)
1275
1292
  .updateCharacteristic(Characteristic.PM2_5Density, pM25Level);
1276
1293
 
1277
- //error sensor
1294
+ //other sensors
1295
+ this.inStandbyService?.updateCharacteristic(Characteristic.ContactSensorState, inStandbyMode);
1278
1296
  this.connectService?.updateCharacteristic(Characteristic.ContactSensorState, isConnected);
1279
1297
  this.errorService?.updateCharacteristic(Characteristic.ContactSensorState, isInError);
1280
1298
 
@@ -1381,16 +1399,16 @@ class DeviceErv extends EventEmitter {
1381
1399
  this.emit('info', `Current ventilation mode: ${Ventilation.OperationModeMapEnumToString[actualVentilationMode]}`);
1382
1400
  this.emit('info', `Target temperature: ${setTemperature}${obj.temperatureUnit}`);
1383
1401
  this.emit('info', `Room temperature: ${roomTemperature}${obj.temperatureUnit}`);
1384
- if (hasSupplyTemperature && deviceData.Device.SupplyTemperature !== null) this.emit('info', `Supply temperature: ${roomTemperature}${obj.temperatureUnit}`);
1385
- if (hasOutdoorTemperature && deviceData.Device.OutdoorTemperature !== null) this.emit('info', `Outdoor temperature: ${roomTemperature}${obj.temperatureUnit}`);
1402
+ if (supportsSupplyTemperature && deviceData.Device.SupplyTemperature !== null) this.emit('info', `Supply temperature: ${roomTemperature}${obj.temperatureUnit}`);
1403
+ if (supportsOutdoorTemperature && deviceData.Device.OutdoorTemperature !== null) this.emit('info', `Outdoor temperature: ${roomTemperature}${obj.temperatureUnit}`);
1386
1404
  this.emit('info', `Fan speed mode: ${Ventilation.FanSpeedMapEnumToString[setFanSpeed]}`);
1387
1405
  this.emit('info', `Temperature display unit: ${obj.temperatureUnit}`);
1388
1406
  this.emit('info', `Core maintenance: ${Ventilation.CoreMaintenanceMapEnumToString[coreMaintenanceRequired]}`);
1389
1407
  this.emit('info', `Filter maintenance: ${Ventilation.FilterMaintenanceMapEnumToString[filterMaintenanceRequired]}`);
1390
- if (hasCO2Sensor) this.emit('info', `CO2 detected: ${Ventilation.Co2DetectedMapEnumToString[roomCO2Detected]}`);
1391
- if (hasCO2Sensor) this.emit('info', `CO2 level: ${roomCO2Level} ppm`);
1392
- if (hasPM25Sensor) this.emit('info', `PM2.5 air quality: ${Ventilation.PM25AirQualityMapEnumToString[pM25AirQuality]}`);
1393
- if (hasPM25Sensor) this.emit('info', `PM2.5 level: ${pM25Level} µg/m`);
1408
+ if (supportsCO2Sensor) this.emit('info', `CO2 detected: ${Ventilation.Co2DetectedMapEnumToString[roomCO2Detected]}`);
1409
+ if (supportsCO2Sensor) this.emit('info', `CO2 level: ${roomCO2Level} ppm`);
1410
+ if (supportsPM25Sensor) this.emit('info', `PM2.5 air quality: ${Ventilation.PM25AirQualityMapEnumToString[pM25AirQuality]}`);
1411
+ if (supportsPM25Sensor) this.emit('info', `PM2.5 level: ${pM25Level} µg/m`);
1394
1412
  };
1395
1413
  })
1396
1414
  .on('success', (success) => this.emit('success', success))