Skip to content

Fix Apollo Firmware Version sensor showing unknown#54

Merged
bharvey88 merged 3 commits intobetafrom
fix/firmware-version-sensor
Mar 7, 2026
Merged

Fix Apollo Firmware Version sensor showing unknown#54
bharvey88 merged 3 commits intobetafrom
fix/firmware-version-sensor

Conversation

@bharvey88
Copy link
Contributor

@bharvey88 bharvey88 commented Mar 6, 2026

Version:

What does this implement/fix?

Fixes Apollo Firmware Version text sensor showing "unknown" in Home Assistant.

  • Replaced component.update with text_sensor.template.publish for the version sensor in reportAllValues script (Battery.yaml and NonBattery.yaml)
  • Removed update_interval: never so the lambda also fires periodically (every 60s) as a fallback

The root cause is that ESPHome's component.update action silently skips execution when the component's is_ready() check fails (see UpdateComponentAction::play() in esphome/core/base_automation.h). The text_sensor.template.publish action calls publish_state() directly without this guard.

Same fix as ApolloAutomation/AIR-1#87

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
  • Website of github readme file update - 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

Summary by CodeRabbit

  • Bug Fixes
    • Improved Apollo firmware version detection and display by updating the update mechanism for more reliable version information retrieval across different device configurations.

@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 18 minutes and 19 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: 678ab85b-51e9-448b-b94c-6b9954ef64ea

📥 Commits

Reviewing files that changed from the base of the PR and between 9406600 and 97f3307.

📒 Files selected for processing (10)
  • Integrations/ESPHome/Battery.yaml
  • Integrations/ESPHome/Core.yaml
  • Integrations/ESPHome/NonBattery.yaml
  • Integrations/ESPHome/TEMP-1.yaml
  • Integrations/ESPHome/TEMP-1B.yaml
  • Integrations/ESPHome/TEMP-1B_BLE.yaml
  • Integrations/ESPHome/TEMP-1B_Minimal.yaml
  • Integrations/ESPHome/TEMP-1_BLE.yaml
  • Integrations/ESPHome/TEMP-1_Beta.yaml
  • Integrations/ESPHome/TEMP-1_Minimal.yaml

Walkthrough

This PR modifies three ESPHome configuration files to change how the apollo_firmware_version is updated. The changes replace explicit component update calls with template-based publishing and remove an explicit update interval constraint.

Changes

Cohort / File(s) Summary
Apollo Firmware Version Update
Integrations/ESPHome/Battery.yaml, Integrations/ESPHome/Core.yaml, Integrations/ESPHome/NonBattery.yaml
Replaced component.update: apollo_firmware_version with text_sensor.template.publish for template-based publishing. Removed update_interval: never constraint from Core.yaml to allow default update timing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • TrevorSchirmer

Poem

🐰 A firmware version hops along,
From update calls to templates strong,
No interval to hold it down,
Just publish forth through all the town! ✨

🚥 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 title 'Fix Apollo Firmware Version sensor showing unknown' clearly and specifically describes the main fix in the changeset—resolving the firmware version sensor display issue across all three 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-sensor

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.

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.
Removed component.update from reportAllValues scripts.
Add text_sensor.template.publish for apollo_firmware_version at
priority 500 to all TEMP-1 variant files. Move existing publish
in TEMP-1.yaml from priority 800 to separate 500 block. Change
priority from 800 to 500 for Minimal, BLE, and B_BLE variants.
R2 variants inherit the fix via !include.
@bharvey88
Copy link
Contributor Author

confirmed working with sleep!

@bharvey88 bharvey88 merged commit 6473912 into beta Mar 7, 2026
38 checks passed
@bharvey88 bharvey88 deleted the fix/firmware-version-sensor branch March 7, 2026 16:18
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