Skip to content

Add TEMP-1 hot water recirculation blueprint#17

Open
bharvey88 wants to merge 4 commits into
mainfrom
feature/temp1-hot-water-recirc
Open

Add TEMP-1 hot water recirculation blueprint#17
bharvey88 wants to merge 4 commits into
mainfrom
feature/temp1-hot-water-recirc

Conversation

@bharvey88

@bharvey88 bharvey88 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

One blueprint that reproduces Donovan's hot water recirculation system (write-up: the TEMP-1 wiki page).

How it works: the user picks a Start trigger (their button's press) via the trigger selector. That turns on the pump. The blueprint then watches the TEMP-1 probe and the pump's power sensor to open the 3-way valve (sinks switch to the house heater), runs an optional Actions when ready sequence (announce / shower fan / light flash via an action selector), stops the pump once its draw drops, and reverts the valve when the line cools. Two for:-duration state triggers are safety backstops.

  • No helpers or timers to create
  • Entity pickers for pump plug, pump power, valve plug, TEMP-1 probe
  • Number inputs for activate/return temp and pump-finished power
  • min_version: 2024.10.0 (trigger selector)

⚠️ Not tested live yet — opening for review so you can import and test before merge. The wiki page's import button points at main, so this needs to land on main before the docs PR goes live.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a new Home Assistant blueprint for hot-water recirculation automation.
    • Supports configurable start triggers, temperature thresholds, device selection, safety timeouts, and optional actions when the valve opens.
    • Automatically coordinates the pump and 3-way valve using temperature readings and pump power to detect completion, with safeguards to prevent excessive runtime.

One automation that runs Donovan's recirculation system: a user-picked start
trigger (their button press) turns on the pump, then it watches the TEMP-1 probe
and the pump's power to open the 3-way valve, runs optional "ready" actions
(announce, shower fan, light), and reverts to the mini tank when the line cools.
Two state-trigger timeouts act as safety backstops. No helpers required.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@bharvey88, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 28593c8b-3a92-446a-a02c-7320e09f1659

📥 Commits

Reviewing files that changed from the base of the PR and between dc02214 and 9e6b8dd.

📒 Files selected for processing (1)
  • TEMP-1/hot-water-recirculation.yaml

Walkthrough

Adds a new Home Assistant blueprint TEMP-1/hot-water-recirculation.yaml that automates hot-water recirculation using a pump smart plug, a 3-way valve smart plug, and a TEMP-1 temperature sensor, with configurable temperature thresholds, power-based pump-done detection, safety timeouts, and optional ready actions.

Changes

Hot Water Recirculation Blueprint

Layer / File(s) Summary
Blueprint metadata and inputs
TEMP-1/hot-water-recirculation.yaml
Defines blueprint name, author, description, HA min version, and all user-configurable inputs: device/entity selectors for pump switch, power sensor, valve switch, and temp probe; activate/return temperature thresholds; min pump power; safety timeout durations; and optional ready_actions. Mode set to queued with max: 10.
Triggers and queued action logic
TEMP-1/hot-water-recirculation.yaml
Adds six triggers (temperature threshold, power-below threshold, timed pump-completion, pump safety overrun, valve over-open safety, and valve-on transition) and a choose action block dispatching valve open/close, pump on/off, and ready_actions execution. Default branch turns the pump on when the user start trigger fires and the pump is currently off.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 A blueprint hops into the yaml nest,
Pump and valve and sensor, all expressed,
When the water's warm, the valve swings wide,
Safety timeouts keep the flow in stride,
No more cold-tap waiting — hot water's blessed! 🌊

🚥 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 clearly and concisely describes the main change: adding the TEMP-1 hot water recirculation blueprint.
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 feature/temp1-hot-water-recirc

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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
TEMP-1/hot-water-recirculation.yaml (1)

76-97: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Defaulting return_temp equal to activate_temp leaves no hysteresis.

With both defaulting to 90 °F, the valve opens above 90 and closes below 90 with effectively no dead band, inviting open/close flapping when the line hovers near the threshold. Consider a lower default for return_temp (e.g., 80) so closing lags opening.

♻️ Suggested default
     return_temp:
       name: Return temperature
       description: Close the valve (back to the mini tank) once the line drops below this.
-      default: 90
+      default: 80
🤖 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 `@TEMP-1/hot-water-recirculation.yaml` around lines 76 - 97, The
`activate_temp` and `return_temp` defaults in `hot-water-recirculation.yaml`
currently match, which removes hysteresis and can cause valve flapping near the
threshold. Adjust the `return_temp` default to a lower value than
`activate_temp` (for example, 80 instead of 90) while keeping the existing
selector ranges and descriptions intact, so the valve closes later than it
opens.
🤖 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 `@TEMP-1/hot-water-recirculation.yaml`:
- Around line 245-254: The default branch in hot-water-recirculation.yaml is
acting as a catch-all in the choose logic, so ordinary triggers like open_temp
and close_temp can fall through and turn on the pump unexpectedly when their
state checks fail. Update the choose/default handling so only the id-less
start_trigger can reach the pump-on action, and make the branch conditions in
the recirculation automation explicitly prevent non-start triggers from entering
default. Use the existing trigger ids and the pump_switch target/action block to
locate the logic and tighten the guard.

---

Nitpick comments:
In `@TEMP-1/hot-water-recirculation.yaml`:
- Around line 76-97: The `activate_temp` and `return_temp` defaults in
`hot-water-recirculation.yaml` currently match, which removes hysteresis and can
cause valve flapping near the threshold. Adjust the `return_temp` default to a
lower value than `activate_temp` (for example, 80 instead of 90) while keeping
the existing selector ranges and descriptions intact, so the valve closes later
than it opens.
🪄 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: 6b8e89c1-c305-4c6e-b033-5f53422f534e

📥 Commits

Reviewing files that changed from the base of the PR and between f84c28e and 0cd7548.

📒 Files selected for processing (1)
  • TEMP-1/hot-water-recirculation.yaml

Comment thread TEMP-1/hot-water-recirculation.yaml Outdated
The default branch acted as a catch-all: any built-in trigger (e.g. open_temp,
close_temp) whose guard conditions failed fell through to default and turned the
pump on. Ordinary temperature movement while idle could start a cycle.

Replace default with a guarded choose branch using condition: not around the
known trigger ids, so only the id-less user start trigger can reach the pump-on
action, and only when the pump is off.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fix a stale code comment that referred to a "default branch" (replaced by the
guarded start branch) and drop em dashes from the description. No logic changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

- Start branch: if the line is already above the activate temperature,
  open the valve directly instead of running the pump. On a hot line the
  pump's thermostat never spins the motor, so no power crossing fired
  and the plug sat on until the safety timeout.
- New pump_started trigger + branch covers the same edge case when the
  pump plug is turned on directly (dashboard tap, voice command), which
  bypasses the guarded start branch.
- mode: queued -> parallel. A slow ready_actions run would otherwise
  queue the pump/valve safety branches behind it, so the safety timeout
  was not actually a bound.
- return_temp defaults to 80 so closing lags opening (CodeRabbit).
- Temperature inputs drop the min 60 / °F pin; metric installs compare
  the probe state in °C and need values near 30.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

2 participants