Refactor debug level

Raised the level for method `single` from `lvlDebug` to `lvlWarn`.
This commit is contained in:
DigiLive committed 2025-05-13 12:08:45 +02:00
1 parent 9a7be8ba49
commit dd7a3c8d5f
1 file changed
+2 -2
+2 -2
View File
@@ -2,7 +2,7 @@ import { Registry } from '../Registry';
import { DeviceRegistryEntry } from '../types/homeassistant/data/device_registry';
import { EntityCategory, EntityRegistryEntry } from '../types/homeassistant/data/entity_registry';
import { RegistryEntry, StrategyConfig } from '../types/strategy/strategy-generics';
import { logMessage, lvlDebug } from './debug';
import { logMessage, lvlWarn } from './debug';
/**
* A class for filtering and sorting arrays of Home Assistant's registry entries.
@@ -441,7 +441,7 @@ class RegistryFilter<T extends RegistryEntry, K extends keyof T = keyof T> {
return result[0];
}
logMessage(lvlDebug, `Expected a single element, but found ${result.length}.`);
logMessage(lvlWarn, `Expected a single element, but found ${result.length}.`);
return undefined;
}