# Analytics snippet placeholder — HearthNodes (gatherer.top) # Paste the measurement snippet here (server.js inlines any content that contains # a markup tag into on every page). No GA4 property is assigned to this # site yet, so leave this file as comments only and the build emits no tracking # code.
HearthNodesgatherer.top live 27/28 EN 中文

Pollen lockout that closes windows before the count spikes

Using a local pollen sensor plus a 3-hour forecast, the automation closes windows 40 minutes before a predicted spike and hands ventilation to the HEPA supply unit, then reopens when the outdoor count falls below 20 grains/m³ for 30 minutes.

protocol · wifi latency · 2400000 ms power · mains published · 2026-11-01 3 devices
Automation YAML climate-pollen-window-lock.yaml
# HearthNodes recipe 15 - pollen lockout
alias: "Climate - pollen lockout with lead time"
id: hn_climate_pollen_lockout
description: "Close 40 minutes before a predicted spike, HEPA supplies positive pressure"
mode: restart
max_exceeded: silent

trigger:
  - platform: numeric_state
    entity_id: sensor.outdoor_pollen_grains
    above: 50
  - platform: numeric_state
    entity_id: sensor.pollen_forecast_3h_peak
    above: 80
  - platform: event
    event_type: mobile_app_notification_action
    event_data:
      action: HAY_FEVER_BUTTON

variables:
  all_windows: "{{ states.cover | selectattr('entity_id','search','_window$') | map(attribute='entity_id') | list }}"
  saved_positions: "{{ dict(all_windows | zip(all_windows | map('state_attr','current_position'))) }}"

condition:
  - condition: state
    entity_id: input_boolean.pollen_sensitivity
    state: "on"
  - condition: numeric_state
    entity_id: sensor.hepa_filter_life
    above: 10

action:
  - service: input_text.set_value
    target:
      entity_id: input_text.window_positions_before_lockout
    data:
      value: "{{ saved_positions | to_json }}"
  - service: cover.close_cover
    target:
      entity_id: "{{ all_windows }}"
  - service: fan.turn_on
    target:
      entity_id: fan.hepa_supply
    data:
      percentage: 60
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.pollen_lockout
  - wait_for_trigger:
      - platform: numeric_state
        entity_id: sensor.outdoor_pollen_grains
        below: 20
        for: "00:30:00"
    timeout: "24:00:00"
    continue_on_timeout: true
  - service: script.restore_window_positions
    data:
      saved: "{{ states('input_text.window_positions_before_lockout') }}"
      quiet_hours_defer: true

# Pollen sensor offline -> falls back to the coarser cloud forecast rather than
# dropping the lockout. HEPA exhausted -> partial unlock, bedrooms only, because
# a flat with neither ventilation nor filtration is worse than pollen.
Trigger · numeric_state

sensor.outdoor_pollen_grains

Outdoor pollen count exceeds 50 grains/m³, or the 3-hour forecast predicts a peak above 80 grains/m³ within 40 minutes.

Pollen lockout that closes windows before the count spikes topology

Step-by-step

  1. cover.*_windowClose every window that the actuator controls; leave manual windows alone but notify with a specific list. set_cover_position · 0
  2. fan.hepa_supplyBring the HEPA supply unit to medium, which holds the flat at positive pressure so pollen does not enter through gaps. turn_on · speed medium · filter class H13
  3. cover.*_windowReopen to the positions that were recorded before the lockout, not to a fixed value. return to previous position when outdoor < 20 grains/m³ for 30 min
  4. input_boolean.pollen_lockoutKeep a single boolean for the lockout so other recipes (bedroom night cooling) can defer to it instead of each implementing its own check. keep on until 30 quiet minutes
Step-by-step
Lock out before the spike, not during it

Pollen grains that are already inside stay airborne for 30–60 minutes. Closing windows when the count peaks means the flat is already loaded. The 40-minute lead time from the forecast is what makes the difference between a comfortable afternoon and a symptomatic one.

Positive pressure, not just filtration

A purifier on recirculation cleans the air but does nothing about the 0.4 ACH of unfiltered air coming through window seals. Running a HEPA supply unit at medium holds the flat at +5 Pa, which reverses that flow. This is the single most effective step for a hay-fever household.

Restore the previous positions, not 100 %

Reopening everything to full after a lockout throws away the blind and window positions the household had set. Record positions on lockout and restore them; it takes four lines of code and removes an entire class of annoyance.

Hardware

ModelProtocolLinkRole in this chain
Laser particle counter configured for pollen-sized fractions wifi wireless Reports PM2.5 and the 10–40 µm fraction; the coarse fraction is the one that correlates with pollen rather than traffic.
HEPA supply unit with a motorised damper wifi wired Maintains positive pressure; a recirculating purifier cannot keep pollen out of a leaky flat the way positive pressure can.
Window actuators (same as the night-cooling recipe) wifi wired Shared hardware with the night-cooling recipe; the lockout boolean is what arbitrates between them.

When it fails

If the pollen sensor goes offline, the automation falls back to the cloud forecast, which is coarser but keeps the lockout working; the notification says which source was used. If the HEPA unit is off or its filter is exhausted, the lockout is lifted partially — windows stay closed only in the bedrooms, since a flat with no ventilation and no filtration is worse than pollen.

Recipes on the same trigger source

Terms Informational only. These recipes control mains electricity, water and physical access. You are responsible for local electrical and plumbing codes, for fusing and isolation, and for testing every fail-safe yourself. Nothing here is professional engineering, legal or safety advice.