@apocaliss92/nodelink-js 0.4.18 → 0.4.19

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.
@@ -16237,6 +16237,9 @@ function computeDeviceCapabilities(params) {
16237
16237
  const isDoorbellFromModel = typeof params.model === "string" && /doorbell/i.test(params.model);
16238
16238
  const lightTypeRaw = supportItem ? supportItem.lightType : void 0;
16239
16239
  const lightType = typeof lightTypeRaw === "number" ? lightTypeRaw : typeof lightTypeRaw === "string" ? Number(lightTypeRaw) : void 0;
16240
+ const ledCtrlRaw = supportItem ? supportItem.ledCtrl : void 0;
16241
+ const ledCtrl = typeof ledCtrlRaw === "number" ? ledCtrlRaw : typeof ledCtrlRaw === "string" ? Number(ledCtrlRaw) : void 0;
16242
+ const hasFloodlightFromLedCtrl = typeof ledCtrl === "number" && Number.isFinite(ledCtrl) && ledCtrl > 1;
16240
16243
  const hasPtzFromSupport = hasPtzFromSupportItem || (ptzMode ? ptzMode !== "none" && ptzMode !== "0" : false);
16241
16244
  const hasPanTiltFromSupport = ptzMode ? ptzMode.includes("pt") || ptzMode === "pt" || ptzMode === "ptz" : false;
16242
16245
  const hasZoomFromSupport = ptzMode ? ptzMode.includes("z") : false;
@@ -16279,8 +16282,10 @@ function computeDeviceCapabilities(params) {
16279
16282
  hasBattery,
16280
16283
  hasIntercom: hasIntercomFromSupport,
16281
16284
  hasSiren: hasSirenFromSupport || hasSirenFromAbilities,
16282
- // lightType >= 2 indicates controllable white LED / floodlight (1 = IR only)
16283
- hasFloodlight: Number.isFinite(lightType) ? lightType >= 2 : hasFloodlightFromAbilities,
16285
+ // lightType >= 2 indicates controllable white LED / floodlight (1 = IR only).
16286
+ // ledCtrl > 1 is a secondary signal that rescues firmwares like the Duo 3
16287
+ // WiFi which under-report lightType (=1) despite having a real spotlight.
16288
+ hasFloodlight: Number.isFinite(lightType) ? lightType >= 2 || hasFloodlightFromLedCtrl : hasFloodlightFromAbilities || hasFloodlightFromLedCtrl,
16284
16289
  hasPir: hasPirFromAbilities || hasPirFromSupport,
16285
16290
  isDoorbell,
16286
16291
  hasAutotracking: ptzDisabledBySupport ? false : hasAutotrackingFromSupport || hasAutotrackingFromAbilities,
@@ -26325,7 +26330,7 @@ ${xml}`
26325
26330
  const probed = await this.probeFloodlightSupportByCmd289(ch, {
26326
26331
  timeoutMs: 2500
26327
26332
  });
26328
- capabilities.hasFloodlight = probed;
26333
+ capabilities.hasFloodlight = capabilities.hasFloodlight || probed;
26329
26334
  }
26330
26335
  let dingDongListIds;
26331
26336
  let dingDongCfgIds;