Skip to content

Force sen5x model to SEN55 to keep NOx enabled on misreporting units#114

Merged
bharvey88 merged 5 commits into
betafrom
force-sen55-model
Jul 23, 2026
Merged

Force sen5x model to SEN55 to keep NOx enabled on misreporting units#114
bharvey88 merged 5 commits into
betafrom
force-sen55-model

Conversation

@bharvey88

@bharvey88 bharvey88 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Version: 26.7.23.1

What does this implement/fix?

Some AIR-1 units report SEN54 on the sen5x product name register even though the NOx element is present and working. ESPHome disables NOx on those units:

[D][sen5x:125]: Type: SEN54
[E][sen5x:139]: NOx requires a SEN55

Sets model: sen55 in Core.yaml using the core sen5x model: 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. Bumps min_version to 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

  • 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

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Updated Apollo AIR firmware/components to the latest supported version.
    • Raised the minimum required ESPHome version for AIR-1 configurations (including BLE and Factory) to 2026.7.2.
  • Bug Fixes
    • Improved SEN5x NOx sensor reliability by explicitly setting the sensor model to SEN55, ensuring NOx remains enabled on devices that misreport the model.

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)
@bharvey88 bharvey88 added the bugfix Bug fix label Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bad43681-f51a-4f60-a046-d05d76dfc706

📥 Commits

Reviewing files that changed from the base of the PR and between 050da4c and 1836d30.

📒 Files selected for processing (4)
  • Integrations/ESPHome/AIR-1.yaml
  • Integrations/ESPHome/AIR-1_BLE.yaml
  • Integrations/ESPHome/AIR-1_Factory.yaml
  • Integrations/ESPHome/Core.yaml
💤 Files with no reviewable changes (2)
  • Integrations/ESPHome/AIR-1_Factory.yaml
  • Integrations/ESPHome/AIR-1.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • Integrations/ESPHome/AIR-1_BLE.yaml
  • Integrations/ESPHome/Core.yaml

Walkthrough

ESPHome configurations now require version 2026.7.2. Core.yaml updates the Apollo version substitution to 26.7.23.1 and forces the SEN5x NOx configuration to use the sen55 model.

Changes

ESPHome Configuration Updates

Layer / File(s) Summary
ESPHome version requirements and Apollo version
Integrations/ESPHome/AIR-1*.yaml, Integrations/ESPHome/Core.yaml
Raises the ESPHome minimum version to 2026.7.2 and updates the Apollo version substitution to 26.7.23.1.
SEN5x NOx model override
Integrations/ESPHome/Core.yaml
Sets the SEN5x NOx configuration model to sen55 and adds comments describing the override.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A bunny hops through YAML bright,
SEN55 keeps NOx in sight.
New versions guard the way,
Fresh firmware blooms today.
Clean-air carrots save the day!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: forcing the SEN5x model to SEN55 so NOx stays enabled on misreporting units.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch force-sen55-model

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.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

Integrations/ESPHome/Core.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Integrations/ESPHome/Core.yaml (1)

21-23: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin 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 the sen5x-model-override branch.

-  - 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1b86a0c and fd7780a.

📒 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)
@bharvey88

Copy link
Copy Markdown
Contributor Author

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 model: sen55.

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)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1ab9ff2 and d00eb72.

📒 Files selected for processing (4)
  • Integrations/ESPHome/AIR-1.yaml
  • Integrations/ESPHome/AIR-1_BLE.yaml
  • Integrations/ESPHome/AIR-1_Factory.yaml
  • Integrations/ESPHome/Core.yaml

Comment thread Integrations/ESPHome/AIR-1.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)
@bharvey88
bharvey88 merged commit aa1fffc into beta Jul 23, 2026
10 checks passed
@bharvey88
bharvey88 deleted the force-sen55-model branch July 23, 2026 15:02
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.

1 participant