tsvesync 1.0.72 → 1.0.73

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.
@@ -358,6 +358,47 @@ export abstract class VeSyncFan extends VeSyncBaseDevice {
358
358
  return this.config.features.includes(feature);
359
359
  }
360
360
 
361
+ /**
362
+ * Check if feature is supported in current mode
363
+ */
364
+ isFeatureSupportedInCurrentMode(feature: string): boolean {
365
+ // First check if the feature is supported at all
366
+ if (!this.hasFeature(feature)) {
367
+ return false;
368
+ }
369
+
370
+ // Check mode-specific restrictions
371
+ const currentMode = this.mode;
372
+
373
+ // Some features are not supported in sleep mode
374
+ if (currentMode === 'sleep') {
375
+ // Display and child lock are not supported in sleep mode
376
+ if (feature === 'display' || feature === 'child_lock') {
377
+ return false;
378
+ }
379
+ }
380
+
381
+ // Fan speed is only supported in manual mode for some devices
382
+ if (feature === 'fan_speed' && this.deviceType.startsWith('LV-')) {
383
+ return currentMode === 'manual';
384
+ }
385
+
386
+ // Auto mode is not supported on Core200S
387
+ if (feature === 'auto_mode' && this.deviceType.includes('Core200S')) {
388
+ return false;
389
+ }
390
+
391
+ // Feature is supported in current mode
392
+ return true;
393
+ }
394
+
395
+ /**
396
+ * Get maximum fan speed level
397
+ */
398
+ getMaxFanSpeed(): number {
399
+ return this.config.levels ? Math.max(...this.config.levels) : 3;
400
+ }
401
+
361
402
  /**
362
403
  * Get current mode
363
404
  */