diff options
| author | Christian Kolset <ckolset@colostate.edu> | 2026-07-29 13:41:29 -0600 |
|---|---|---|
| committer | Christian Kolset <ckolset@colostate.edu> | 2026-07-29 13:41:29 -0600 |
| commit | 934d3fc18bc4fc0e05d26a12d635915b00bd8c8d (patch) | |
| tree | efd235350b0cbd014e44591aeef8e6d806335b54 /core/profile.py | |
| parent | 23800a32231acecbace12bfc41c03b081b1bf565 (diff) | |
| parent | d9ca58e48cf92438087ac24ee261c2c4911316b1 (diff) | |
Merge branch 'feat/device-naming'
Diffstat (limited to 'core/profile.py')
| -rw-r--r-- | core/profile.py | 9 |
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: |
