Optional options in UI property control become dropdown

This commit is contained in:
Joe Knapper 2026-02-12 22:35:41 +00:00 committed by Julian Stirling
parent 89c5ea6886
commit ae81520494
4 changed files with 37 additions and 0 deletions

View file

@ -83,6 +83,13 @@ class PropertyControl(BaseModel):
read_back_delay: int = 1000
"""The delay in ms before reading back the property."""
options: list[str] = []
"""A list of options to pass to the UI for a dropdown.
These options aren't validated in the UI in any way, and invalid
settings will only be rejected when selected.
"""
def property_control_for(
thing: lt.Thing, property_name: str, **kwargs: Any