Secondary Return Pump using PIRs

Motion-activated hot water return pump (UK, unvented cylinder)

I’m UK-based and have a secondary hot water return/recirculation pump on an unvented cylinder. Previously, the pump was running 24/7, which was unnecessary and inefficient.

I’ve now automated it using Zigbee PIR sensors in the main bathroom and ensuites. When motion is detected, the pump runs for 5 minutes to ensure hot water is available, then switches back off. A 1-hour cooldown timer prevents it from retriggering too frequently.

The pump itself is currently connected via a Heatmiser Neo Smart Plug, but this approach should work just as well with any smart plug or relay/module (e.g. Shelly).

Automation 1: Activate pump on bathroom motion

This automation:

  • Triggers when motion is detected by any bathroom PIR
  • Only runs if the pump is currently off
  • Enforces a 1-hour cooldown between activations
  • Turns the pump on for 5 minutes
  • Starts both a runtime timer and a cooldown timer
alias: Hot Water Pump Activation on Motion
description: >
  This automation activates the hot water pump for 5 minutes when motion is
  detected by any bathroom PIR sensor, but only if the pump is currently off and
  no activation has occurred in the last hour (enforced by a cooldown timer). It
  sets the pump to 'on' mode, starts a 5-minute runtime timer, and initiates a
  1-hour cooldown to prevent frequent triggering.
triggers:
  - entity_id:
      - binary_sensor.pir_bathroom1
      - binary_sensor.pir_bathroom2
      - binary_sensor.pir_bathroom3
      - binary_sensor.pir_bathroom4
      - binary_sensor.pir_bathroom5
    to: "on"
    trigger: state
conditions:
  - condition: state
    entity_id: binary_sensor.hot_water_pump_output
    state: "off"
  - condition: state
    entity_id: timer.hot_water_pump_cooldown
    state: idle
actions:
  - target:
      entity_id: select.hot_water_pump
    data:
      option: "on"
    action: select.select_option
  - target:
      entity_id: timer.hot_water_pump_runtime
    data:
      duration: "00:05:00"
    action: timer.start
  - target:
      entity_id: timer.hot_water_pump_cooldown
    data:
      duration: "01:00:00"
    action: timer.start
mode: single

Automation 2: Turn pump off after runtime

This automation simply turns the pump off once the 5-minute runtime timer completes.

alias: Hot Water Pump Deactivation After Runtime
description: >
  This automation deactivates the hot water pump by setting it to 'off' mode
  when the 5-minute runtime timer finishes, ensuring the pump runs for exactly
  the intended duration after motion-triggered activation.
triggers:
  - event_type: timer.finished
    event_data:
      entity_id: timer.hot_water_pump_runtime
    trigger: event
conditions: []
actions:
  - target:
      entity_id: select.hot_water_pump
    data:
      option: "off"
    action: select.select_option
mode: single
1 Like