[const] Move CONF_SCAN_PARAMETERS and CONF_WINDOW to components/const - #17900
Conversation
|
👋 Hi there! This PR modifies 3 file(s) with codeowners. @bdraco, @esphome/core - As codeowner(s) of the affected files, your review would be appreciated! 🙏 Note: Automatic review request may have failed, but you're still welcome to review. |
|
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#17900
components: [bk72xx_ble_tracker, const, esp32_ble_tracker]
refresh: 1h(Added by the PR bot) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #17900 +/- ##
=======================================
Coverage 86.60% 86.60%
=======================================
Files 60 60
Lines 14217 14217
Branches 2147 2147
=======================================
Hits 12312 12312
Misses 1594 1594
Partials 311 311 🚀 New features to boost your workflow:
|
Memory Impact AnalysisComponents:
This analysis runs automatically when components change. Memory usage is measured from a representative test configuration. |
|
Thanks @Bl00d-B0b |
What does this implement/fix?
Moves
CONF_SCAN_PARAMETERSandCONF_WINDOWintoesphome/components/const/__init__.py, and switches their two current definers (esp32_ble_tracker,bk72xx_ble_tracker) to import them from there.Both constants are now defined in two components, and the in-flight LN882H tracker (#16691) needs the same names — a third definition trips the
ci-customduplicate-constant lint, whose prescribed remedy is exactly this move in a separate PR.The names remain importable from
esp32_ble_tracker(thefrom … importkeeps them in the module namespace), so any external consumer is unaffected.Verified:
script/ci-custom.pyoutput is identical to a cleandevcheckout (the duplicate-constant lint no longer fires, nothing new appears),ruff check/formatclean, and both the esp32 and BK72xx tracker configs still validate.Types of changes
Test Environment
Checklist:
tests/folder).