@blueharford/scrypted-spatial-awareness 0.1.14 → 0.1.15

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/plugin.zip CHANGED
Binary file
@@ -34525,6 +34525,25 @@ class AlertManager {
34525
34525
  */
34526
34526
  getDefaultNotifiers() {
34527
34527
  try {
34528
+ // Try new multiple notifiers setting first
34529
+ const notifiers = this.storage.getItem('defaultNotifiers');
34530
+ if (notifiers) {
34531
+ // Could be JSON array or comma-separated string
34532
+ try {
34533
+ const parsed = JSON.parse(notifiers);
34534
+ if (Array.isArray(parsed)) {
34535
+ return parsed;
34536
+ }
34537
+ }
34538
+ catch {
34539
+ // Not JSON, might be comma-separated or single value
34540
+ if (notifiers.includes(',')) {
34541
+ return notifiers.split(',').map(s => s.trim()).filter(Boolean);
34542
+ }
34543
+ return [notifiers];
34544
+ }
34545
+ }
34546
+ // Fallback to old single notifier setting
34528
34547
  const defaultNotifier = this.storage.getItem('defaultNotifier');
34529
34548
  return defaultNotifier ? [defaultNotifier] : [];
34530
34549
  }
@@ -36108,10 +36127,12 @@ class SpatialAwarenessPlugin extends sdk_1.ScryptedDeviceBase {
36108
36127
  defaultValue: true,
36109
36128
  group: 'Alerts',
36110
36129
  },
36111
- defaultNotifier: {
36112
- title: 'Default Notifier',
36130
+ defaultNotifiers: {
36131
+ title: 'Notifiers',
36113
36132
  type: 'device',
36133
+ multiple: true,
36114
36134
  deviceFilter: `interfaces.includes('${sdk_1.ScryptedInterface.Notifier}')`,
36135
+ description: 'Select one or more notifiers to receive alerts',
36115
36136
  group: 'Alerts',
36116
36137
  },
36117
36138
  // Tracked Cameras