Skip to content
Generic Hygrostat for Home Assistant
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
custom_components/generic_hygrostat
.gitignore Minor .gitignore update Jul 6, 2019
README.md Merge branch 'master' of github.com:basschipper/homeassistant-generic… Oct 23, 2019
info.md Fixed incorrect example configuration indents Aug 22, 2019

README.md

ko-fi

Generic Hygrostat for Home Assistant

Due to the fact that humidity levels are different during the summer and winter, a static humidity level switching the fan is on/off is not possible. This binary_sensor detects high rises in humidity and switches on. And switches off when the humidity is back to normal.

Inspired by: https://www.domoticz.com/wiki/Humidity_control

Setup

In your configuration.yaml you'll need:

binary_sensor:
- platform: generic_hygrostat
  name: Bathroom Hygrostat
  sensor: sensor.bathroom_climate_humidityy # Source humidity sensor
  delta_trigger: 3 # Optional humidity swing to detect
  target_offset: 3 # Optional dehumidification target offset
  max_on_time: 7200 # Optional # Optional safety max on time

It will create a binary sensor called binary_sensor.bathroom_hygrostat. Next, add some automations to switch your fan:

automation:
- alias: Bathroom Hygrostat On
  trigger:
    platform: state
    entity_id: binary_sensor.bathroom_hygrostat
    to: 'on'
  action:
    - service: switch.turn_on
      entity_id: switch.fan

- alias: Bathroom Hygrostat Off
  trigger:
    platform: state
    entity_id: binary_sensor.bathroom_hygrostat
    to: 'off'
  action:
    - service: switch.turn_off
      entity_id: switch.fan

Installation

Manual

Put the binary_sensor.py in your home-assistant config directory under custom_components/generic_hygrostat.

Custom Updater

hygrostat_updater.json provides the details Custom Updater needs. See Custom Updater Installation to install it.

Add the following to your configuration:

custom_updater:
  track:
    - components
  component_urls:
    - https://raw.githubusercontent.com/basschipper/homeassistant-generic-hygrostat/master/hygrostat_updater.json
You can’t perform that action at this time.