-
Notifications
You must be signed in to change notification settings - Fork 336
Open
Labels
Description
Context
Identified during review of PR #3344: #3344 (comment)
The options flow handler currently stores user-modified settings in config_entry.data instead of config_entry.options. In Home Assistant, .options is the standard location for user-modifiable settings from the options UI, while .data holds initial setup values.
Required Changes
1. Update OptionsFlowHandler in config_flow.py
- Line 1017: Change to update with
options=user_inputinstead ofoptions=self.config_entry.options
2. Update option reading pattern across the codebase
Apply fallback pattern: config_entry.options.get(KEY, config_entry.data.get(KEY, DEFAULT))
Files to update:
runtime_data.py(lines 120-140): Update the options dict creation in__post_init____init__.py(lines 451-465, 2173): Update option reading locations
3. Configuration keys to update
- CONF_INCLUDE_DEVICES
- CONF_EXCLUDE_DEVICES
- CONF_QUEUE_DELAY
- CONF_SCAN_INTERVAL
- CONF_PUBLIC_URL
- CONF_EXTENDED_ENTITY_DISCOVERY
- CONF_DEBUG
Benefits
- Follow Home Assistant best practices for configuration management
- Ensure UI-updated options are properly respected
- Future-proof against HA core changes to configuration handling
References
Reactions are currently unavailable