Smart Home Assistant

Home Assistant Dehumidifier Automation: Run It on Humidity (UK)

SepehrBy Sepehr· 22 November 2026· Updated 22 November 2026· 7 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Abstract water droplet beside three horizontal humidity bars on a dark navy background with a red outline

Key takeaways

  • Use the Generic Hygrostat helper with device class dehumidifier, a humidity sensor and a smart plug, and aim for around 55% humidity.
  • The Centre for Sustainable Energy recommends 40–60% relative humidity, with a risk of mould growth above 60%.
  • Test first: if the dehumidifier comes back in standby after a plug power cut, a smart plug cannot switch it on.
  • Set sensor_stale_duration so a dead sensor battery turns the plug off instead of leaving the unit running.
  • An energy-monitoring plug lets you alert on a full tank when power drops near zero for 20 minutes while humidity stays high.
On this page[tap to expand]

A Home Assistant dehumidifier automation switches a dehumidifier on when a humidity sensor reads too high and off when the air is dry enough. The simplest route is the built-in Generic Hygrostat helper plus a smart plug.

Plan on about 30 minutes. The steps below create the control, add a tank-full alert, restrict running hours, and pause the unit when a window is open. The catch most people hit is a dehumidifier that comes back in standby after the plug cuts its power, so check that in Step 1.

Line chart of humidity rising to 58 percent, switching the plug on, falling to 52 percent, and switching it off again
A hygrostat switches only at the edges of a band, so the dehumidifier is not clicked on and off every minute.

What do you need before you start?

  • A dehumidifier that restarts by itself. Press its power button on, set its own humidity dial to maximum or continuous, then pull the plug and reinsert it. If it starts running again, a smart plug can control it. If it comes back in standby, the plug cannot switch it on; look for a model with an auto-restart feature, or one with its own Home Assistant integration.
  • A smart plug that Home Assistant controls locally, rated for the dehumidifier's power draw. Check the figures on both labels. Our best smart plugs guide covers sensible options, and a plug with energy monitoring unlocks the tank-full alert in Step 3.
  • A humidity sensor in the room, away from the dehumidifier's exhaust. A Zigbee or Bluetooth sensor is fine, and our temperature and humidity sensor guide compares them.
  • The Companion app for the phone alert; see the notifications guide if you have not set it up.

What humidity should a dehumidifier aim for?

Aim for 40 to 60% relative humidity. The Centre for Sustainable Energy recommends keeping humidity between 40% and 60% and says there is a risk of mould growth once it goes above 60%. For a dehumidifier it advises setting the unit to under 60% where possible.

A target of 55% gives a little headroom below that line, and it avoids drying the air harder than necessary, which costs more electricity. Treat 55% as a starting value to adjust for your home. A dehumidifier treats a symptom, so if a wall stays wet or the reading will not fall, look for a leak, a blocked vent or a damp source first.

Step 1: Check the sensor and the plug are in Home Assistant

Open Settings → Devices & services → Entities and find two entities: your humidity sensor (a sensor with a percent unit) and the plug's switch (a switch). The examples use sensor.lounge_humidity and switch.dehumidifier_plug; swap in your own names.

Turn the switch on and off from the entity dialog and confirm the dehumidifier starts and stops each time. This is the restart test from the prerequisites: if the unit only runs after you press its button, stop here, because nothing below will work.

Step 2: Create the Generic Hygrostat

The Generic Hygrostat integration wraps a switch and a humidity sensor into one humidifier entity with a target. Home Assistant's documentation says you can add it under Settings → Devices & services → Helpers → Create helper → Generic hygrostat, although the UI offers a more limited set of options than YAML. Choose the plug as the switch, the sensor as the humidity sensor, and set the device class to dehumidifier.

For the full option set, use YAML. There is no separate dehumidifier setting; the documentation says you pick it with device_class:

humidifier:
  - platform: generic_hygrostat
    name: Lounge dehumidifier
    unique_id: lounge_dehumidifier
    humidifier: switch.dehumidifier_plug
    target_sensor: sensor.lounge_humidity
    device_class: dehumidifier
    min_humidity: 40
    max_humidity: 70
    target_humidity: 55
    dry_tolerance: 3
    wet_tolerance: 3
    min_cycle_duration:
      minutes: 10
    sensor_stale_duration:
      minutes: 30

Restart Home Assistant or reload YAML, and a humidifier.lounge_dehumidifier entity appears. Each option earns its place:

  • Tolerances set how far humidity may drift from the target before the plug switches. Start with equal values, then widen them if the dehumidifier cycles too often. The documentation notes they are only applied when the sensor changes, not at start-up.
  • min_cycle_duration stops the switch changing state again within ten minutes, which protects a compressor from rapid on/off cycling.
  • sensor_stale_duration treats the sensor as unavailable if it goes quiet for 30 minutes. The documentation says the humidifier is turned off for safety when the sensor is unavailable, so a dead sensor battery will not leave the unit running all night.

One Generic Hygrostat entity controls one switch, so a second room needs its own entry. If you want to keep things tidy, our helpers guide explains how helpers fit into the rest of your setup.

Step 3: Add a tank-full alert

A dehumidifier with a full tank usually stops pulling water out and may stop drawing normal power, while Home Assistant still thinks it is working. With an energy-monitoring plug you can spot that. This automation fires when the dehumidifier is meant to be running, the room is still humid, and the plug has drawn almost nothing for 20 minutes:

alias: Dehumidifier tank may be full
triggers:
  - trigger: numeric_state
    entity_id: sensor.dehumidifier_plug_power
    below: 10
    for:
      minutes: 20
conditions:
  - condition: state
    entity_id: switch.dehumidifier_plug
    state: "on"
  - condition: numeric_state
    entity_id: sensor.lounge_humidity
    above: 60
actions:
  - action: notify.mobile_app_your_phone
    data:
      title: "Dehumidifier stopped"
      message: "Humidity is still high but the dehumidifier is drawing no power. Empty the tank?"
      data:
        tag: dehumidifier-tank

The 10 W threshold is a guess to be measured, not a rule. Watch sensor.dehumidifier_plug_power in Developer tools → States while the unit runs and while its tank is full, then pick a value between the two readings. The for duration matters because some compressor models pause during a defrost cycle; twenty minutes avoids most false alarms. Our energy monitoring guide has more on reading power from plugs.

If your model has a drain hose, run it to a sink or drain and skip this step entirely.

Step 4: Restrict when it can run

You may not want a dehumidifier running while you sleep, or you may want it limited to a cheaper electricity window. Because the hygrostat is an ordinary humidifier entity, you can turn it off and on with a time-based automation. Switching the hygrostat off stops it controlling the plug; switching it on hands control back:

alias: Dehumidifier daytime window
triggers:
  - trigger: time
    at: "09:00:00"
    variables:
      state: "on"
  - trigger: time
    at: "21:00:00"
    variables:
      state: "off"
actions:
  - action: "humidifier.turn_{{ state }}"
    target:
      entity_id: humidifier.lounge_dehumidifier

Adjust the times to suit you. If you are on a time-of-use tariff, run the window against your cheap period instead; the Octopus Agile cheapest-slots guide shows how to find those periods in Home Assistant. A quiet unit can often run overnight in a bedroom, but a noisy one will not, so use your own judgement.

Step 5: Pause it when a window is open

Running a dehumidifier with a window open wastes electricity, because it is trying to dry the outdoor air. If you already have a window contact sensor, add one more automation that turns the hygrostat off after five minutes of an open window and back on when it closes:

alias: Dehumidifier window pause
triggers:
  - trigger: state
    entity_id: binary_sensor.lounge_window
    to: "on"
    for:
      minutes: 5
    variables:
      state: "off"
  - trigger: state
    entity_id: binary_sensor.lounge_window
    to: "off"
    variables:
      state: "on"
actions:
  - action: "humidifier.turn_{{ state }}"
    target:
      entity_id: humidifier.lounge_dehumidifier

This pairs naturally with the heating version of the same idea in our window-open heating guide. Be aware that the daytime window in Step 4 and this pause both toggle the same entity, so the last trigger to fire wins. If that bothers you, add a time condition to the window pause so it only acts inside your running hours.

Step 6: Test it before you trust it

Raise the humidity on purpose by setting the target to a few points below the current reading with Developer tools → Actions and humidifier.set_humidity, then confirm the plug switches on after the tolerance is exceeded. Set it back afterwards. Open the humidifier entity's history to see how often it cycles over a day, and widen the tolerances if it is more than a few times an hour.

Finally, check the failure case. Unplug the sensor's battery or pause its integration, wait for the stale duration, and confirm the hygrostat shuts the plug off. Then test the tank alert by temporarily lowering its humidity condition.

Give it a week before judging the result. Look at the humidity graph alongside the plug's on and off history: you want to see the reading held inside the 40 to 60% band, with the plug running for stretches rather than flickering. If the room still drifts above 60% overnight with the unit working, the dehumidifier is undersized or the moisture source is bigger than it can handle, and more automation will not fix that. Note how much water you empty each day too, since a sudden change is a useful clue to a leak or a new habit such as drying washing indoors.

Common problems and fixes

The plug turns on but the unit stays in standby: the dehumidifier does not resume after power loss. Choose a model with auto-restart, or use a model with its own integration.

The hygrostat entity says off: it is the controller that must be on. Turn humidifier.lounge_dehumidifier on; the time window in Step 4 may have turned it off.

It never starts although humidity is high: the sensor may be stale or unavailable, and the documentation says the hygrostat turns off when its sensor is unavailable. Check the sensor's battery and last update time. Also confirm the reading is above the target plus tolerance.

It switches on and off too often: widen the tolerances and increase min_cycle_duration. Sensors placed near the exhaust air read artificially dry.

The humidity will not drop below 60%: the unit may be too small for the room or there is a moisture source. Check for leaks and drying laundry indoors, keep trickle vents open as the CSE advises, and see the best smart dehumidifiers guide.

What should you build next?

Add a warning for when humidity stays high despite the dehumidifier with the Home Assistant mould alert. A power-cut alert tells you if the unit has lost power, and a goodnight routine can switch the dehumidifier window off for the night.

Buy the picks in this guide

Recommended for Home Automation

See all devices →

Frequently asked questions

Can Home Assistant control any dehumidifier?
Home Assistant can control a dehumidifier in two ways. If the model has its own integration, it appears as a humidifier entity with the dehumidifier device class, and you can set a target humidity directly. If it does not, you can put it on a smart plug and let the Generic Hygrostat helper switch the plug from a humidity sensor. The second route only works when the dehumidifier restarts by itself after power is restored, so test that before you buy a plug. Some units return to standby and need a button press, in which case a plug cannot start them. Also check that the plug is rated for the load, and prefer a model with a drain hose if you cannot empty the tank often.
What humidity should I set my dehumidifier to in the UK?
Aim for a target of around 55% relative humidity and keep the room between 40% and 60%. The Centre for Sustainable Energy recommends that range and says there is a risk of mould growth when humidity goes above 60%, and it advises setting a dehumidifier to under 60% if possible. A 55% target leaves a few points of margin below that line without forcing the unit to dry the air as hard as it can, which uses more electricity. The right figure for your home may differ, so watch the room for a week and adjust. If humidity will not fall, look for a leak or a moisture source rather than lowering the target further.
How do I stop my dehumidifier cycling on and off constantly?
Short cycling usually comes from tolerances that are too narrow or a sensor that sits in the dehumidifier's exhaust air. In the Generic Hygrostat, widen the dry and wet tolerances so the plug only switches when humidity moves further from the target, and set min_cycle_duration so the switch must hold its state for a minimum time, for example ten minutes. That also protects a compressor from rapid restarts. Move the sensor to a spot that reflects the room, away from the outlet and from damp walls, then check the entity history for a day. If it is still switching more than a few times an hour, the dehumidifier may simply be too small for the space.
How do I know when the dehumidifier tank is full?
The most reliable method with a smart plug is an energy-monitoring one. When a tank fills, many dehumidifiers shut off their compressor and fan, so the power reading falls close to zero while the plug is still on and the room is still humid. Trigger an automation when power stays below a threshold you have measured for about 20 minutes, with conditions that the plug is on and humidity is above 60%. The long delay avoids false alarms from defrost cycles on some compressor models. The alert only works if the plug measures power accurately at low loads. If your dehumidifier has a drain hose, run it to a sink or drain and you can skip this step.

Sources

Sources verified 2026-11-22

  1. Home Assistant — Generic Hygrostat
  2. Home Assistant — Humidifier
  3. Centre for Sustainable Energy — Condensation, damp and mould
  4. Home Assistant — Automation triggers
›How we researched this

Claims in this article are checked against primary sources — manufacturer specifications, official documentation, Which? research, Ofgem guidance, or gov.uk — rather than forum threads or video reviews. Where the author has direct hands-on experience with a product (most Home Assistant, Zigbee, and home-networking gear is running in his own homelab), that is stated explicitly in the text.

For categories outside that personal setup — such as boilers, heat pumps, and other areas that are traditionally a heating engineer's domain — verdicts are built from cross-referenced manufacturer data, published lab results, and vetted expert and owner reviews rather than a claim of personal hands-on testing. See the editorial policy for the full methodology.

Sepehr

Written by

Sepehr

10+ years hands-on with Home Assistant & networking · Research-backed elsewhere · No brand deals

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Citing this page? Please use a dofollow link back to the original article — it helps us keep the data on this page accurate and up to date.

Related reading