Repository navigation
Add physics-based predicted room temperature & humidity (re-land #102) - #135
Conversation
Adds two template sensors that estimate true room temperature and humidity, correcting for the Air-1 enclosure's self-heating: - Predicted Room Temperature: weighted blend of SEN55/DPS310/SCD40 temperatures with a thermal-gradient correction (Physics Multiplier P, Baseline Offset). - Predicted Room Humidity: re-references each sensor's RH to the predicted room temperature via the Magnus formula, then blends by manufacturing tolerance. Supporting additions, all additive (stock sensors and their defaults are unchanged): - New CONFIG numbers: Physics Multiplier P, Baseline Offset, SCD40 Temperature Offset, SCD40 Humidity Offset (all default to a neutral value). - Expose SCD40 Temperature/Humidity and name the DPS310 Temperature sensor so the prediction lambdas can read them. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
These are advanced, opt-in sensors. Mark the two Predicted Room sensors, their CONFIG tuning numbers, and the newly-exposed SCD40/DPS310 inputs as disabled_by_default so the stock device page stays clean. The prediction lambdas still read the on-device state regardless of HA enablement, so functionality is unaffected when the entities are hidden. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add attribution to Ellude (Apollo Discord), who did the research and coefficient fitting. Note that the Physics Multiplier P default (0.5357) is provisional pending a better fitted value. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Guard the warm-up gate against a NaN sys_uptime. sys_uptime is NaN until its first publish (~60s) and NaN < 180.0 is false, so the gate could let both prediction lambdas run before warm-up. Check isnan() first. - Extend the temperature lambda's NaN check to the coefficient/baseline values so a bad restore can't slip a NaN through the arithmetic. - Add isnan offset guards to the SCD40 temperature/humidity filters, matching the existing DPS310 pressure-offset pattern. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Swap 17.62/243.12 (Sonntag 1990) for 17.625/243.04 per review, and cite the source in a comment. The formula is only used as a ratio, so the difference in predicted RH is under 0.02 %RH either way; this just makes the constants traceable to the cited paper. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Core.yaml now carries only a five-line packages include; all prediction logic lives in the new Integrations/ESPHome/Predicted_Room.yaml: - The four tuning CONFIG numbers and both Predicted Room template sensors moved over verbatim. - The SCD40 temperature/humidity exposure (with offset filters) and the DPS310 temperature naming now extend the Core hardware blocks via id: !extend, so the stock sensor definitions in Core.yaml are untouched by this PR. No functional change: all three variants validate and the rendered config contains the same entities as before, still disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe ESPHome Core configuration updates its firmware version and includes a new ChangesPredicted room sensors
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
Version: 26.10.16.1
What does this implement/fix?
Re-lands @bharvey88's "Predicted Room Temperature & Humidity" work from #102. That PR was closed without merging and its fork branch was deleted, so it can't be reopened. This branch has Brandon's six commits unchanged, with authorship kept. Research and coefficient fitting are by Ellude (Apollo Discord).
The feature is already documented on the wiki: https://wiki.apolloautomation.com/products/air1/additional-info/predicted-room-temp-humidity/
What it adds, all in the new
Integrations/ESPHome/Predicted_Room.yaml, whichCore.yamlincludes as a package. Everything isdisabled_by_default: true.!extend) so the lambdas can read them.Changes on top of #102
beta(26.10.8.1). There were no conflicts. The onlyCore.yamloverlap is the newpackages:key, which sits next to beta's new substitutions/OTA/channel/BLE-proxy blocks and doesn't touch them.Verification
betafor every variant. The changes are additive: 4 new numbers, 2 new template sensors, SCD40 temperature/humidity added, and the DPS310 temperature named and no longer internal. Everything else is identical, including the stock SEN55 Temperature/Humidity.Known limitations (worth adding to the wiki)
Supersedes #102.
Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified:
Compiles and validates on all variants and ESPHome versions. Hardware check on one AIR-1 (USB flash from 26.10.8.1, SCD40 fitted): settings preserved, predicted sensors held until uptime ≥ 180 s, then published; Baseline Offset +1 °C moved Predicted Room Temperature +1.01 °C.
🤖 Generated with Claude Code
Summary by CodeRabbit