Skip to content

Fix: publish firmware version once on boot instead of polling#31

Merged
bharvey88 merged 2 commits intobetafrom
fix/firmware-version-on-boot
Mar 7, 2026
Merged

Fix: publish firmware version once on boot instead of polling#31
bharvey88 merged 2 commits intobetafrom
fix/firmware-version-on-boot

Conversation

@bharvey88
Copy link
Contributor

@bharvey88 bharvey88 commented Mar 6, 2026

Summary

  • Replaced the 60s polling lambda with a single text_sensor.template.publish on boot
  • Added update_interval: never back to the sensor definition since the value is a compile-time constant
  • Consistent with the same fix applied across AIR-1, PLT-1, TEMP-1, and BTN-1

Per ESPHome developer feedback: there's no need to poll a constant value every 60s — just publish it once at boot.

Summary by CodeRabbit

  • Chores
    • Refactored firmware version tracking to use explicit boot-time initialization instead of automatic periodic computation, improving configuration clarity.

Per ESPHome dev feedback: the version is a compile-time constant, so
publish it once on_boot rather than using a lambda with periodic updates.
@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

Warning

Rate limit exceeded

@bharvey88 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f528b160-a5b9-4281-8290-1caaf9543c8b

📥 Commits

Reviewing files that changed from the base of the PR and between abfb0e8 and f0f2a12.

📒 Files selected for processing (1)
  • Integrations/ESPHome/PUMP-1_Minimal.yaml

Walkthrough

The PR modifies the Apollo Firmware Version sensor's update mechanism across two ESPHome configuration files. It removes the lambda-based dynamic computation from the core definition and disables periodic updates, while adding an explicit on-boot publish action to set the firmware version state.

Changes

Cohort / File(s) Summary
Firmware Version Sensor Configuration
Integrations/ESPHome/Core.yaml, Integrations/ESPHome/PUMP-1.yaml
Refactors Apollo Firmware Version sensor from lambda-driven updates to event-driven updates via on-boot action. Removes lambda computation, adds update_interval: never to prevent periodic polling, and introduces explicit state publishing on device boot.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • TrevorSchirmer

Poem

🐰 A sensor that once computed with glee,
Now waits for the boot to be free,
No lambda to race, just a pristine place,
Where firmware versions live with grace! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly summarizes the main change: replacing periodic polling of firmware version with a single boot-time publication. It accurately reflects the core objective across both modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/firmware-version-on-boot

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 and usage tips.

Add text_sensor.template.publish for apollo_firmware_version at
priority 500 to PUMP-1_Minimal for dashboard import users.
@bharvey88
Copy link
Contributor Author

confirmed working!

@bharvey88 bharvey88 merged commit bb2c678 into beta Mar 7, 2026
8 checks passed
@bharvey88 bharvey88 deleted the fix/firmware-version-on-boot branch March 7, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants