Skip to content

Fix BLE deep sleep duration 60x too long#119

Merged
TrevorSchirmer merged 1 commit into
betafrom
fix/ble-sleep-multiplier
Jul 23, 2026
Merged

Fix BLE deep sleep duration 60x too long#119
TrevorSchirmer merged 1 commit into
betafrom
fix/ble-sleep-multiplier

Conversation

@bharvey88

Copy link
Copy Markdown
Contributor

Version: 26.7.23.1 (kept, per maintainer)

What does this implement/fix?

The Sleep Duration number is in minutes, and Core and the Factory variant convert it with x * 60 * 1000. The BLE variant's on_boot restore used x * 60 * 60 * 1000, treating minutes as hours: a 5 minute setting made the device sleep 5 hours after every boot. Fix the multiplier to match. Flagged by CodeRabbit on #115.

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

🤖 Generated with Claude Code

The Sleep Duration number is minutes, but the BLE on_boot restore
converted it with a 60 * 60 * 1000 multiplier, treating minutes as
hours. A 5 minute setting slept 5 hours. Match Core and Factory.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@bharvey88 bharvey88 added the bugfix Bug fix label Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@bharvey88, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c3a04a5d-53d8-437f-af15-8388f6aa4c62

📥 Commits

Reviewing files that changed from the base of the PR and between e13fcf4 and 9890f41.

📒 Files selected for processing (1)
  • Integrations/ESPHome/AIR-1_BLE.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ble-sleep-multiplier

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TrevorSchirmer
TrevorSchirmer merged commit 5a25cd4 into beta Jul 23, 2026
11 checks passed
@TrevorSchirmer
TrevorSchirmer deleted the fix/ble-sleep-multiplier branch July 23, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants