eufy-security-client 2.2.1 → 2.2.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.
package/README.md CHANGED
@@ -80,6 +80,10 @@ Please use GitHub issues for this.
80
80
 
81
81
  ## Changelog
82
82
 
83
+ ### 2.2.2 (2022-11-06)
84
+
85
+ * (bropat) Fixed issue identifying alarm delay
86
+
83
87
  ### 2.2.1 (2022-11-05)
84
88
 
85
89
  * (bropat) Added support for Floodlight Cam (T8420X)
@@ -529,6 +529,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
529
529
  await this.getCameraInfo();
530
530
  }
531
531
  getArmDelay(mode) {
532
+ var _a, _b, _c;
532
533
  let propertyName;
533
534
  switch (mode) {
534
535
  case types_1.AlarmMode.HOME:
@@ -549,8 +550,13 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
549
550
  }
550
551
  if (propertyName !== undefined && this.hasPropertyValue(propertyName) && this.getPropertyValue(propertyName) !== "") {
551
552
  const settings = this.getPropertyValue(propertyName);
552
- if (settings.count_down_arm.channel_list.length > 0 && settings.count_down_arm.delay_time > 0) {
553
- return settings.count_down_arm.delay_time;
553
+ try {
554
+ if (((_b = (_a = settings.count_down_arm) === null || _a === void 0 ? void 0 : _a.channel_list) === null || _b === void 0 ? void 0 : _b.length) > 0 && ((_c = settings.count_down_arm) === null || _c === void 0 ? void 0 : _c.delay_time) > 0) {
555
+ return settings.count_down_arm.delay_time;
556
+ }
557
+ }
558
+ catch (error) {
559
+ this.log.debug(`Station ${this.getSerial()} - getArmDelay - Error`, { error: error, mode: mode, propertyName: propertyName, settings: settings });
554
560
  }
555
561
  }
556
562
  return 0;