Add note about defaults in select inputs (#2712)

This commit is contained in:
Petar Petrov 2025-06-27 18:12:30 +03:00 committed by GitHub
parent a87d626dfd
commit aaf985168a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -315,6 +315,8 @@ class ExampleOptionsFlow(config_entries.OptionsFlow):
)
```
Note: For select type inputs (created from a `vol.In(...)` schema), if no `default` is specified, the first option will be selected by default in the frontend.
#### Displaying read-only information
Some integrations have options which are frozen after initial configuration. When displaying an options flow, you can show this information in a read-only way, so that users may remember which options were selected during the initial configuration. For this, define an optional selector as usual, but with the `read_only` flag set to `True`.