Feat: Allow climate entity as indoor temperature source#85
Conversation
The indoor temperature entity selector now accepts both temperature `sensor` and `climate` entities. When a `climate` entity is selected, its current temperature is displayed, not the target temperature. Closes #84.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughBumps blueprint compatibility to 17, adds climate-entity support for indoor temperature rendering, suppresses sending Nextion wakeup_page_id for boot/screensaver pages, adds YAML eol normalization for .yaml files, and removes surplus blank lines from the bug issue template. Changes
Sequence Diagram(s)(Skipped — changes are localized and do not introduce a new multi-component sequential flow requiring visualization.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@nspanel_easy_blueprint.yaml`:
- Around line 7337-7355: The templates for indoor_temp_raw, indoor_temp_unit and
indoor_temp currently assume climate entities always have a valid
current_temperature; update their guards to explicitly check the
current_temperature attribute (e.g., state_attr(indoor_temperature_sensor,
"current_temperature") is not none and is_number(state_attr(...))) in addition
to the entity kind so you don’t stringify None into an empty value; specifically
modify the conditional branches around indoor_temperature_sensor (used in
indoor_temp_raw, indoor_temp_unit and indoor_temp) to validate
state_attr(indoor_temperature_sensor, "current_temperature") before using it,
and fall back to the non-climate branch or an explicit empty/none value when the
attribute is missing or not numeric (keeping references to indoor_temp_raw and
indoor_temp_unit intact).
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 52c7dafb-3cc4-494f-8dff-777c48f752b4
📒 Files selected for processing (4)
.github/ISSUE_TEMPLATE/bug.ymlesphome/nspanel_esphome_hw_display.yamlesphome/nspanel_esphome_version.yamlnspanel_easy_blueprint.yaml
💤 Files with no reviewable changes (1)
- .github/ISSUE_TEMPLATE/bug.yml
The indoor temperature entity selector now accepts both temperature
sensorandclimateentities. When aclimateentity is selected, its current temperature is displayed, not the target temperature.Closes #84
Summary by CodeRabbit
New Features
Improvements
Documentation
Chores