Fix Apollo Firmware Version sensor showing unknown#26
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 (1)
WalkthroughThis pull request modifies the ESPHome configuration to change how the apollo_firmware_version sensor is updated. Instead of using component update calls, the firmware version is now published via text_sensor.template.publish events in API actions, boot scripts, and status reporting. The update_interval constraint is also removed from the sensor definition. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 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 on_client_connected and reportAllValues.
|
confirmed working with sleep as well! |
What does this implement/fix?
Fixes Apollo Firmware Version text sensor showing "unknown" in Home Assistant.
component.updatewithtext_sensor.template.publishfor the version sensor in bothon_client_connectedandreportAllValuesscriptupdate_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:
Summary by CodeRabbit