Fix Apollo Firmware Version sensor showing unknown#54
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
WalkthroughThis 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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.
|
confirmed working with sleep! |
Version:
What does this implement/fix?
Fixes Apollo Firmware Version text sensor showing "unknown" in Home Assistant.
component.updatewithtext_sensor.template.publishfor the version sensor inreportAllValuesscript (Battery.yaml and NonBattery.yaml)update_interval: neverso the lambda also fires periodically (every 60s) as a fallbackThe root cause is that ESPHome's
component.updateaction silently skips execution when the component'sis_ready()check fails (seeUpdateComponentAction::play()inesphome/core/base_automation.h). Thetext_sensor.template.publishaction callspublish_state()directly without this guard.Same fix as ApolloAutomation/AIR-1#87
Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified:
Summary by CodeRabbit