Add OptionsFlow to SMTP integration#173386
Open
tr4nt0r wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds an options flow to the SMTP integration in Home Assistant, moving the debug and timeout settings from config entry data to config entry options. This allows users to modify these settings through the UI without needing to recreate the config entry.
Changes:
- Added
OptionsFlowHandlerclass andOPTIONS_SCHEMAtoconfig_flow.pyfor managing debug/timeout options - Updated import flow and
__init__.pyto store and read debug/timeout fromentry.optionsinstead ofentry.data - Updated tests and fixtures to reflect the new options structure
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| homeassistant/components/smtp/config_flow.py | Adds options flow handler, options schema, and updates import logic to separate options from data |
| homeassistant/components/smtp/init.py | Spreads entry.options into discovery info passed to notification service |
| homeassistant/components/smtp/notify.py | Reads CONF_DEBUG from discovery_info instead of using hardcoded default |
| homeassistant/components/smtp/strings.json | Adds UI strings for the options flow fields |
| tests/components/smtp/conftest.py | Updates mock config entry fixture with options dict |
| tests/components/smtp/test_config_flow.py | Adds test for the options flow |
| tests/components/smtp/test_init.py | Updates import tests to verify options are stored separately |
erwindouna
requested changes
Jun 9, 2026
Contributor
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Adds an options flow to the SMTP integration that reintroduces the
debug andtimeout parameters that were previously available in YAML configuration but omitted in the transition to UI config. The Import flow has been adjusted to import the parameters to options.Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: