Agricultural patterns · Home Assistant

VPD-Based Control.

Reading time
~12 min · 2,480 words
FAQ
0 questions
Status
Draft 1 · under review
Section
All Home Assistant pages

Relative humidity is the measurement growers have been handed for decades. Vapor pressure deficit is what the plant actually responds to. The difference matters because a greenhouse at 70% RH and 70°F is comfortable; a greenhouse at 70% RH and 90°F is oppressive. Same humidity number, very different biological reality. VPD captures this — it measures how much more water the air can hold, which is directly what drives transpiration and how plants lose water through their leaves. A climate control setup built around VPD responds to what the plant is experiencing rather than to a proxy. This page covers how to calculate VPD in Home Assistant as a template sensor, how to set VPD targets by crop and growth stage, how to build automations that use VPD rather than RH for ventilation and humidification decisions, and the failure modes that produce wrong VPD readings despite the sensor hardware being fine. The shift from RH thinking to VPD thinking takes a week or two; once made, it changes how the grower sees the whole climate.

Before building VPD control.

Prerequisites:

Temperature and humidity sensors in place and working. Per [Your First Sensor](/home-assistant/getting-started/first-sensor). VPD is calculated from temperature and humidity, so both sensors need to be reliable. A systematic error in either produces wrong VPD.

Climate control foundation. Per [Climate Control Patterns](/home-assistant/agriculture/climate-control). VPD-based control extends the climate-control patterns rather than replacing them. The hysteresis discipline, fail-safe design, and sensor-health checks all apply here.

Template sensors understood. Per [Template Sensors](/home-assistant/automations/templates). VPD in Home Assistant is a derived value — a template sensor that computes VPD from temperature and humidity. Readers unfamiliar with template sensors should read that page first; this page assumes the basics.

Crop-specific VPD targets. Research what the specific crops and growth stages call for. Target ranges differ by crop (lettuce vs. tomato vs. cannabis), by stage (propagation vs. flowering), and by variety. Extension resources, growers' guides, or the grower's accumulated experience provide the specific numbers.

What VPD actually is.

Vapor pressure deficit is the difference between the current water vapor pressure in the air and the maximum water vapor pressure at the current temperature, measured in kilopascals (kPa).

The intuition.

Air at a specific temperature can hold a specific maximum amount of water vapor (the saturation vapor pressure). The amount of water vapor currently in the air is the actual vapor pressure. The difference between these two is VPD — how much more water the air could take before it was saturated.

High VPD means the air is far from saturation, which pulls water out of plants through transpiration. Low VPD means the air is close to saturation, which slows transpiration because the air is already near its capacity.

The math.

Saturation vapor pressure (SVP) depends on temperature. A common approximation (Tetens' formula):

SVP = 0.6108 × exp(17.27 × T / (T + 237.3))

where T is temperature in Celsius and SVP is in kPa.

Actual vapor pressure (AVP) is:

AVP = SVP × RH / 100

where RH is relative humidity as a percentage.

VPD is simply:

VPD = SVP − AVP

Combining:

VPD (kPa) = 0.6108 × exp(17.27 × T / (T + 237.3)) × (1 − RH / 100)

This is what the Home Assistant template sensor calculates.

Leaf VPD vs. air VPD.

A subtlety: the above calculation gives air VPD. Plants actually respond to leaf VPD, which uses leaf surface temperature rather than air temperature. Leaf temperature is typically 1-3°C cooler than air temperature (because of transpiration), so leaf VPD is slightly lower than air VPD. For most practical control purposes, air VPD is a close-enough proxy. For operations with infrared leaf temperature sensors, a more accurate leaf VPD calculation is possible.

Why VPD beats humidity alone.

Three specific reasons VPD matters more than RH for plant control.

Same RH, different VPD.

Consider a greenhouse at 70% RH: - At 20°C (68°F): VPD ≈ 0.70 kPa (comfortable range for most plants) - At 30°C (86°F): VPD ≈ 1.27 kPa (approaching stressful) - At 35°C (95°F): VPD ≈ 1.69 kPa (genuinely stressful)

The RH is unchanged. The plant's water loss rate nearly triples between the first and third condition. An automation that triggers on "RH below 70%" treats these three situations identically; an automation on VPD responds appropriately to each.

Same VPD, different RH.

Consider a VPD of 1.0 kPa (often a target for vegetative growth): - At 20°C: RH ≈ 57% - At 25°C: RH ≈ 68% - At 30°C: RH ≈ 77%

The target VPD is the same. The required RH varies with temperature. A grower aiming for a specific RH number year-round will see plants stressed in summer and over-humid in winter; a grower aiming for a VPD number gets consistent plant response.

Combined control.

VPD captures both temperature and humidity in one number. An automation that targets VPD naturally handles the combined effect of both variables. An automation that separately controls temperature and humidity has to coordinate two separate loops, which sometimes conflict.

VPD as a Home Assistant template sensor.

Home Assistant doesn't have a native VPD sensor; the grower creates it as a template sensor from temperature and humidity.

The basic template sensor.

Sanity checks on the template.

Once the VPD sensor is live, verify the output makes sense.

At 25°C (77°F) and 50% RH: VPD should be approximately 1.58 kPa. At 25°C and 70% RH: approximately 0.95 kPa. At 20°C and 60% RH: approximately 0.94 kPa. At 30°C and 50% RH: approximately 2.12 kPa.

If the template output is an order of magnitude off, the formula likely has a bug — a common mistake is using temperature in Fahrenheit without conversion (the Tetens formula expects Celsius).

Averaging across multiple sensors.

For zones with multiple temperature/humidity sensor pairs, compute VPD per sensor pair and average the VPD values (rather than averaging the temperatures and humidities separately, which produces a slightly different answer). Each sensor pair sees a slightly different environment; averaging the VPDs captures the zone average VPD correctly.

VPD targets by crop and stage.

Starting targets for common crops and stages. These are approximate and should be adjusted based on specific crop and variety requirements.

Propagation and seedling stage. VPD 0.4-0.8 kPa. Low VPD (high humidity) reduces transpiration demand while roots are still small and limited. Most crops benefit from this range during early development.

Vegetative stage. VPD 0.8-1.2 kPa. Moderate transpiration demand encourages vigorous water and nutrient uptake. The core vegetative range for most crops.

Flowering/fruiting stage (many crops). VPD 1.0-1.5 kPa. Slightly higher than vegetative to drive transpiration and nutrient movement into developing fruits or flowers.

Cannabis flowering stage. VPD 1.2-1.6 kPa. Higher range reflecting the plant's water demand and disease-pressure management (lower humidity reduces botrytis risk in dense flower clusters).

Tomatoes fruiting. VPD 1.0-1.3 kPa. Moderate range; tomatoes handle a relatively wide VPD band compared to some crops.

Lettuce. VPD 0.6-1.2 kPa. Lettuce doesn't like high VPD (leads to tipburn through transpiration-driven calcium transport issues) but doesn't need very low VPD either.

Leafy greens generally. Similar to lettuce. 0.6-1.2 kPa is a reasonable default.

Herbs. Variable. Basil likes 0.8-1.2 kPa. Mint tolerates a wider range.

These ranges are starting points. Observe plant response and adjust. Signs VPD is too high: leaf edge curl, wilting despite adequate irrigation, tipburn in sensitive crops. Signs VPD is too low: slow growth, disease pressure (humidity-driven pathogens), edema (water blisters on leaves). Adjustments of 0.2-0.3 kPa are typical tuning increments.

VPD-based automations.

Once VPD is tracked as a sensor, automations can use it directly.

VPD-based ventilation.

When VPD falls too low (humidity too high relative to temperature), ventilation exchanges humid indoor air for drier outdoor air. The automation triggers on VPD below a threshold and runs exhaust fans or opens vents.

Example logic: - VPD below 0.5 kPa for 10 minutes → ventilation on - VPD above 0.8 kPa for 5 minutes → ventilation off - Condition: outdoor conditions are suitable (not rainy, not freezing, outdoor humidity lower than indoor)

Similar hysteresis principles as Climate Control Patterns — wide enough deadband to prevent cycling.

VPD-based humidification.

When VPD rises too high (air too dry), humidification adds water vapor. Automation triggers on VPD above a threshold and activates humidifiers or misting.

Example logic: - VPD above 1.5 kPa for 10 minutes → humidification on - VPD below 1.2 kPa for 5 minutes → humidification off - Condition: no active irrigation (already adding moisture to space)

VPD-aware cooling.

Cooling decisions benefit from VPD awareness. On a hot dry day, cooling with evaporative methods (swamp coolers, misters) lowers temperature and raises humidity, which drops VPD substantially. This is good if VPD was too high; bad if VPD was already at target.

An automation that checks current VPD before activating evaporative cooling avoids making the VPD problem worse.

VPD-aware heating.

Winter heating dries air, raising VPD. If VPD climbs too high during winter heating, the automation can activate humidification in parallel with heating to maintain VPD targets rather than just temperature targets.

Staged response.

For severe VPD excursions, staged response scales the action. Small VPD excess: light ventilation. Moderate excess: more aggressive ventilation plus humidification. Severe: full response plus alert to grower. The staging matches response intensity to problem severity.

Integration with other control domains.

VPD-based control works best when integrated with the rest of the climate control logic rather than running as an independent layer.

Coordinate with temperature setpoints.

A common pattern: maintain temperature within a range, adjust humidification/dehumidification to keep VPD on target within that temperature range. Temperature remains the outer loop (handled by standard climate-control automations); VPD is the inner loop that refines humidity handling.

Coordinate with irrigation.

Irrigation briefly raises humidity (water evaporating from substrate and foliage). VPD-based humidification automations should ignore brief post-irrigation humidity spikes rather than reacting to them. A hysteresis band, a delay after irrigation events, or a condition excluding recent-irrigation periods all handle this.

Coordinate with lighting.

Peak light periods drive peak transpiration and typically peak VPD needs. Low-light periods allow lower VPD. Automations can use time-of-day (lights on/off) as a condition to shift VPD targets through the photoperiod.

Avoid independent automations that fight.

Following the Climate Control principle: coordinated control beats independent automations that can conflict. A temperature automation running a heater while a VPD automation runs humidification at the same time can work together (heating raises VPD, humidification lowers it). A temperature automation cooling while a VPD automation also targets lower VPD may over-correct and undershoot. Integrated logic prevents this.

Common failure modes.

Specific ways VPD control goes wrong.

The wrong temperature unit. The Tetens formula expects Celsius. A template that uses Fahrenheit without conversion produces VPD values off by a large factor. Symptoms: reported VPD is wildly different from what manual calculation suggests, automation fires at unexpected times. Fix: verify the template's temperature input is in Celsius, or convert explicitly in the template.

The humidity sensor that drifted high. Consumer BLE humidity sensors can drift 5-10% over years, especially in consistently humid environments. A drifted-high reading produces VPD calculated too low. Automation adds unnecessary humidification. Fix: periodic calibration against a reference sensor, replacement of old sensors showing drift.

The humidity sensor that got wet. Condensation on a humidity sensor can cause the sensor to report 100% RH until it dries. During that time, VPD calculation says the air is saturated when it isn't. Automation makes wrong decisions. Fix: radiation shields on humidity sensors, automated detection of stuck-at-100% readings.

The template that averaged wrong. A zone with multiple sensors where temperatures and humidities were averaged separately (then used to calculate one VPD) produces a slightly different answer than averaging VPD values across sensor pairs. The difference is usually small but not zero. Fix: calculate VPD per sensor pair, then average the VPDs.

The VPD target that was for a different crop. A grower set up VPD targets for a previous crop and forgot to adjust them for the current crop. Plants showed subtle stress (transpiration mismatch) that was hard to diagnose. Fix: crop-change protocol includes VPD target review.

The VPD controlling humidity with no temperature coordination. Pure VPD control with no temperature consideration can produce odd outcomes — humidification running hard during cool periods to hit low-temperature VPD targets, dehumidification during hot periods when the temperature is the real issue. Fix: integrated logic that considers both temperature and VPD, with temperature as the outer loop.

The VPD reading during post-irrigation spike. VPD dropped briefly because an irrigation cycle just finished and substrate moisture was evaporating. Automation started dehumidification, which dried the substrate quickly and counteracted the irrigation. Fix: delay VPD-based humidity control for 15-30 minutes after irrigation events.

The VPD calculation that didn't handle unavailable sensors. Temperature sensor went offline. Template tried to calculate VPD with an unavailable input and produced errors or zero values. Downstream automation misbehaved. Fix: availability checks in the template, safe default values, alerts when input sensors go unavailable.

What not to do.

Don't switch to VPD control before understanding what VPD is. The shift from RH thinking requires time. Build the VPD template sensor first, watch the values for a few weeks, develop intuition, then start building automations around VPD.

Don't ignore temperature. VPD depends on temperature; temperature still matters in its own right. Coordinated control beats VPD-only control.

Don't skip sensor verification. Wrong VPD values from bad sensors lead to wrong control decisions. Periodic verification against reference measurements catches sensor drift before it produces operational problems.

Don't use VPD control without hysteresis. Same principle as all other control domains — hysteresis prevents equipment cycling.

Don't fight with irrigation. Wet substrate raises local humidity temporarily. VPD control should not immediately dehumidify after irrigation; it should wait for the post-irrigation transient to settle.

Don't set the same VPD target for every stage. Propagation wants low VPD; flowering wants higher VPD; same crop, different needs. Stage-aware VPD targets match the plant's actual biological needs.

Don't forget leaf vs. air VPD for precision applications. Most operations use air VPD as a close-enough proxy. Operations where fine control matters may benefit from leaf-temperature measurement and leaf VPD calculation.

Don't abandon RH displays entirely. Humidity remains the intuitive number for many operators. Dashboards showing both VPD (the control variable) and RH (the human-readable indicator) serve both audiences.