Disable USB discovery for teleinfo#170933
Merged
balloob merged 3 commits intoMay 16, 2026
Merged
Conversation
Contributor
|
Hey there @esciara, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR disables USB matcher-based discovery for the teleinfo integration (to prevent overly broad VID/PID matches from triggering unwanted serial probing) and ensures serial-port validation only happens after the user confirms a USB discovery flow.
Changes:
- Removed
teleinfoUSB VID/PID matchers from the integration manifest and the generated USB matcher registry. - Deferred Teleinfo frame-reading/validation from
async_step_usbtoasync_step_usb_confirmso discovery no longer auto-probes ports without confirmation. - Updated config flow tests to cover the new “usb_confirm then abort/create” behavior.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/components/teleinfo/test_config_flow.py | Adjusts USB discovery tests to go through the confirmation step before aborting/creating entries. |
| homeassistant/generated/usb.py | Removes teleinfo entries from the generated USB matcher list to stop automatic USB discovery matching. |
| homeassistant/components/teleinfo/manifest.json | Clears USB matcher configuration for teleinfo to disable USB discovery matching. |
| homeassistant/components/teleinfo/config_flow.py | Moves serial port validation and unique_id logic to the confirmation step to prevent auto-probing on discovery. |
balloob
approved these changes
May 16, 2026
Copilot AI
pushed a commit
to AlCalzone/homeassistant-core
that referenced
this pull request
May 17, 2026
Co-authored-by: AlCalzone <17641229+AlCalzone@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Disable USB discovery for the teleinfo integration. The current USB filters are too broad and match a lot of devices. This, coupled with a bug that causes the integration to auto-probe discovered serial ports without confirmation, causes serial issues elsewhere in Core and other addons.
I've also fixed the underlying discovery confirmation bug defensively, just in case some other codepath that I'm not aware of can trigger it.
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: