Repository navigation
Fix LD2410 thresholds reading 0 after a cold boot - #106
Open
TrevorSchirmer wants to merge 1 commit into
Open
TrevorSchirmer wants to merge 1 commit into
TrevorSchirmer wants to merge 1 commit into
Conversation
Each variant turned the radar's Bluetooth off at on_boot priority 900. ESPHome's set_bluetooth() restarts the LD2410 and re-reads its settings about 1 s later, before the freshly restarted radar answers, so the gate thresholds stayed at 0 after a cold boot until Query Params was pressed. Drop the unconditional Bluetooth-off from MSR-2, MSR-2_BLE and MSR-2_Factory. Core.yaml now waits 5 s, re-reads the radar, turns its Bluetooth off only when the radar reports it on, and re-reads again after that restart. Fixes #97
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
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.
Version: 26.11.15.1
What does this implement/fix?
After a cold boot the LD2410 gate thresholds (and sometimes version/MAC) stayed at 0 until Query Params was pressed.
Cause: every variant turned the radar's Bluetooth off at on_boot priority 900. In ESPHome that restarts the LD2410 and re-reads its settings only about 1 s later. On a cold boot the radar has not answered by then, so the values never fill in.
Changes:
read_all_info()), then turns the radar's Bluetooth off only if the radar reports it on. In that case it re-reads again 5 s after the restart. Bluetooth still ends up off after every boot, as before.Compiles cleanly on ESPHome stable (2026.10.2) and dev (2026.12.0-dev) for MSR-2, MSR-2_BLE, MSR-2_Factory and both beta-channel variants. Still needs a cold power-cycle check on hardware (standard and BLE variants).
Fixes #97
Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified: