mirror of
https://github.com/esphome/esphome.git
synced 2026-10-06 19:06:37 +00:00
[core] Suppress component source overflow warnings in testing mode (#15320)
This commit is contained in:
@@ -71,11 +71,13 @@ def register_component_source(name: str) -> int:
|
||||
return pool.sources[name]
|
||||
idx = len(pool.sources) + 1
|
||||
if idx > _MAX_COMPONENT_SOURCES:
|
||||
_LOGGER.warning(
|
||||
"Too many unique component source names (max %d), '%s' will show as '<unknown>'",
|
||||
_MAX_COMPONENT_SOURCES,
|
||||
name,
|
||||
)
|
||||
if not CORE.testing_mode:
|
||||
_LOGGER.warning(
|
||||
"Too many unique component source names (max %d), "
|
||||
"'%s' will show as '<unknown>'",
|
||||
_MAX_COMPONENT_SOURCES,
|
||||
name,
|
||||
)
|
||||
return 0
|
||||
pool.sources[name] = idx
|
||||
_ensure_source_table_registered()
|
||||
|
||||
Reference in New Issue
Block a user