Skip to content

Feat: Allow climate entity as indoor temperature source#85

Merged
edwardtfn merged 6 commits intomainfrom
v9999.99.9
Apr 1, 2026
Merged

Feat: Allow climate entity as indoor temperature source#85
edwardtfn merged 6 commits intomainfrom
v9999.99.9

Conversation

@edwardtfn
Copy link
Copy Markdown
Owner

@edwardtfn edwardtfn commented Apr 1, 2026

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

Summary by CodeRabbit

  • New Features

    • Allow selecting climate entities as indoor temperature sources in addition to temperature sensors; home page shows a climate entity’s current temperature.
  • Improvements

    • Minimum blueprint version requirement raised to 17.
    • Wake-up/page update logic refined to avoid sending updates for boot and screensaver pages.
  • Documentation

    • Clarified climate-based temperature description and removed extra blank-line padding.
  • Chores

    • Normalized YAML line endings to LF.

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.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7fbf8cb9-45d6-405f-b143-6975e943e1a7

📥 Commits

Reviewing files that changed from the base of the PR and between efa839f and 94e7294.

📒 Files selected for processing (1)
  • .gitattributes
✅ Files skipped from review due to trivial changes (1)
  • .gitattributes

📝 Walkthrough

Walkthrough

Bumps 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

Cohort / File(s) Summary
Issue Template Cleanup
.github/ISSUE_TEMPLATE/bug.yml
Removed large blocks of blank lines and trailing whitespace from textarea descriptions and comments (formatting-only).
Display Hardware Logic
esphome/nspanel_esphome_hw_display.yaml
Adjusted Nextion wakeup command emission: wakeup_page_id=... is no longer sent when computed page equals boot or screensaver; change applied in both boot_nextion script and wakeup_page_name handler.
Version Compatibility
esphome/nspanel_esphome_version.yaml
Updated min_blueprint_version from 1617, altering blueprint compatibility checks used in templating/state publishing.
Blueprint: Indoor Temp & Rendering
nspanel_easy_blueprint.yaml
Expanded indoortemp selector to accept sensor (device_class: temperature) or climate; clarified docs that climate uses current_temperature; added conditional Jinja to extract/format climate current_temperature; bumped blueprint_version 16 → 17.
Repo Attributes
.gitattributes
Added rule to treat *.yaml as text with eol=lf for line-ending normalization.

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

🐰 I hopped through YAML, trim and neat,
Quieted wakeups, shuffled no beat,
Climate temps now share their song,
Seventeen bounds the versions strong,
A carrot hop to code complete.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes scope creep: bug fixes in nspanel_esphome_hw_display.yaml (wakeup_page_id logic), version bump in nspanel_esphome_version.yaml, cleanup in bug.yml, and .gitattributes formatting rules unrelated to the climate entity feature. Separate out-of-scope changes into dedicated PRs: the wakeup_page_id fix, version bump, whitespace cleanup, and gitattributes changes should be addressed independently.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: allowing climate entities as indoor temperature sources, which is the primary objective of this PR.
Linked Issues check ✅ Passed The PR fully addresses issue #84 by allowing climate entities as temperature sources. The implementation enables selecting climate entities for indoor temperature display and correctly reads the current_temperature attribute.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v9999.99.9

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

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

📥 Commits

Reviewing files that changed from the base of the PR and between e90ff82 and 4ac6e57.

📒 Files selected for processing (4)
  • .github/ISSUE_TEMPLATE/bug.yml
  • esphome/nspanel_esphome_hw_display.yaml
  • esphome/nspanel_esphome_version.yaml
  • nspanel_easy_blueprint.yaml
💤 Files with no reviewable changes (1)
  • .github/ISSUE_TEMPLATE/bug.yml

Comment thread nspanel_easy_blueprint.yaml
@edwardtfn edwardtfn merged commit 0bcb90c into main Apr 1, 2026
30 checks passed
@edwardtfn edwardtfn deleted the v9999.99.9 branch April 1, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement Temperature override for climate entity

1 participant