[cc1101] Export CC1101Listener to Python - #17576
Merged
Merged
Conversation
The C++ CC1101Listener class and CC1101Component::register_listener() already exist and are usable from other C++ components, but the Python side never bound the class, so external/other components could not reference cc1101.CC1101Listener from their own __init__.py (e.g. to type a config validator or use_id against it) without their own private copy of the class declaration. One-line addition, no behavior change.
Contributor
|
To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file: external_components:
- source: github://pr#17576
components: [cc1101]
refresh: 1h(Added by the PR bot) |
Contributor
Contributor
Memory Impact AnalysisComponents:
This analysis runs automatically when components change. Memory usage is measured from a representative test configuration. |
swoboda1337
approved these changes
Jul 15, 2026
Member
|
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 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.
What does this implement/fix?
The C++
CC1101Listenerclass andCC1101Component::register_listener()already exist and are usedinternally, but the Python side never bound the class. External components that want to register
themselves as a packet listener from their own
__init__.py(e.g. to type acv.use_id()against it,or declare a field of that type) currently have no way to reference
cc1101.CC1101Listenerfrom Pythonwithout duplicating the class declaration. This adds the one missing binding line, matching the existing
CC1101Component = ns.class_(...)pattern right above it.No C++ changes, no behavior changes, no new YAML options.
Types of changes
Related issue or feature (if applicable): -
Pull request in esphome-docs with documentation (if applicable): not applicable, no user-facing configuration change.
Test Environment
Example entry for
config.yaml:Checklist:
tests/folder). (a one-line Python binding with no new runtime behavior; nothing new to assert)If user exposed functionality or configuration variables are added/changed: