summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/profile.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/profile.py b/core/profile.py
index d3c7e3a..7ede859 100644
--- a/core/profile.py
+++ b/core/profile.py
@@ -302,8 +302,15 @@ class ProfileManager:
print(f"[Profile] Unknown device type: {dev_type}")
continue
try:
- kwargs = {k: v for k, v in dev_cfg.items() if k != "device_type"}
+ # "name" is a display label, not a constructor arg — every device
+ # factory builds its own default name internally, so apply it
+ # after construction instead of passing it through.
+ custom_name = dev_cfg.get("name")
+ kwargs = {k: v for k, v in dev_cfg.items()
+ if k not in ("device_type", "name")}
dev = factory(**kwargs)
+ if custom_name:
+ dev.info.name = custom_name
registry.add_instance(dev)
dev.connect()
if engine is not None: