0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

fix(entry_validator): validator reports list of signal if user chooses the wrong one

This commit is contained in:
2025-03-04 10:57:57 +01:00
parent 1206069a8f
commit 906ca03929

View File

@ -22,7 +22,9 @@ class EntryValidator:
if entry is None or entry == "":
entry = next(iter(device._hints), name) if hasattr(device, "_hints") else name
if entry not in description:
raise ValueError(f"Entry '{entry}' not found in device '{name}' signals")
raise ValueError(
f"Entry '{entry}' not found in device '{name}' signals. Available signals: {description.keys()}"
)
return entry