Force sen5x model to SEN55 to keep NOx enabled on misreporting units#114
Conversation
Some AIR-1 units report SEN54 on the sen5x product name register even
though the NOx element is present and working, which makes ESPHome
disable the NOx sensor ("NOx requires a SEN55"). Pull the sen5x
component with a model override from bharvey88/esphome and set
model: sen55 so NOx stays enabled. Temporary until the model option
lands in upstream esphome. Bump version to 26.7.21.1.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughESPHome configurations now require version ChangesESPHome Configuration Updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)Integrations/ESPHome/AIR-1_BLE.yamlTraceback (most recent call last): Integrations/ESPHome/Core.yamlTraceback (most recent call last): 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Integrations/ESPHome/Core.yaml (1)
21-23: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winPin the external component source to a specific commit SHA.
Pulling from an unpinned branch (
sen5x-model-override) introduces a supply chain and stability risk. If the branch is force-pushed, deleted, or compromised, downstream builds will fail or potentially execute unintended code. Consider pinning the source to a specific commit SHA to ensure reproducible and secure builds.🛡️ Proposed fix to pin the commit
Replace
<commit-hash>with the full commit SHA from thesen5x-model-overridebranch.- - source: github://bharvey88/esphome@sen5x-model-override + - source: github://bharvey88/esphome@<commit-hash> components: [sen5x, sensirion_common] - refresh: 1d🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Integrations/ESPHome/Core.yaml` around lines 21 - 23, Update the external component source in the ESPHome configuration to reference the full commit SHA for the sen5x-model-override revision instead of the branch name, while preserving the existing components list and refresh interval.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Integrations/ESPHome/Core.yaml`:
- Around line 21-23: Update the external component source in the ESPHome
configuration to reference the full commit SHA for the sen5x-model-override
revision instead of the branch name, while preserving the existing components
list and refresh interval.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fe38e2d3-005d-4098-8be3-c6e7961434a0
📒 Files selected for processing (1)
Integrations/ESPHome/Core.yaml
Host the component override under the org instead of a personal fork. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
The upstream fix (esphome/esphome#17764) is merged and milestoned for esphome 2026.7.2. Once that release ships we can drop the external_components block here and switch back to the core sen5x component, keeping only |
The model option merged upstream (esphome/esphome#17764, milestoned 2026.7.2), so drop the temporary external_components pull and use the core component. Bump min_version to 2026.7.2. CI stays red on the stable and beta legs until 2026.7.2 releases; merge after that. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Integrations/ESPHome/AIR-1.yaml`:
- Line 10: Lower the min_version requirement from 2026.7.2 to an available
release, such as 2026.7.1, in Integrations/ESPHome/AIR-1.yaml at lines 10-10,
Integrations/ESPHome/AIR-1_BLE.yaml at lines 10-10, and
Integrations/ESPHome/AIR-1_Factory.yaml at lines 10-10; keep the version gate
consistent across all three files.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6d48b18f-8cdb-49da-939c-fc7bcd555f2d
📒 Files selected for processing (4)
Integrations/ESPHome/AIR-1.yamlIntegrations/ESPHome/AIR-1_BLE.yamlIntegrations/ESPHome/AIR-1_Factory.yamlIntegrations/ESPHome/Core.yaml
esphome 2026.7.2 is released, so the core model option this PR requires is now available on stable. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Resolve version conflict in favor of 26.7.23.1. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Version: 26.7.23.1
What does this implement/fix?
Some AIR-1 units report
SEN54on the sen5x product name register even though the NOx element is present and working. ESPHome disables NOx on those units:Sets
model: sen55in Core.yaml using the core sen5xmodel:option (esphome/esphome#17764, ships in 2026.7.2) so NOx stays enabled on units whose product name register misreports. On SEN55-reporting units the override matches detection and nothing changes. Bumpsmin_versionto 2026.7.2 in all three variants.Verified on an affected unit: with the override, NOx reports real values.
esphome 2026.7.2 released 2026-07-23 and carries the
model:option, so all CI legs should pass now. Earlier revisions of this PR pulled a patched component from ApolloAutomation/esphome-components; that is no longer needed.Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified:
🤖 Generated with Claude Code
Summary by CodeRabbit