Switch and sensor based Humidifier Platform

Tags: #<Tag:0x00007fc3fe5b83e8> #<Tag:0x00007fc3fe5b8230> #<Tag:0x00007fc3fe5b75b0>

Hi. I have added a Sonoff th16 switch to a dehumidifier and I’ve been searching for a platform to use a Humidifier Entity but no one found so I’ve create one based on a switch and a humidity sensor. Also to be able to use with homekit.

Download from GitHub

It’s very simple and generic. I hope it can be useful to somebody.

Installation

  • Copy all files in custom_components/switch_humidifier to your config/custom_components/switch_humidifier/ directory.
  • Restart Home-Assistant.
  • Add the configuration to your configuration.yaml file.

Usage

To use this component in your installation, add the following to your configuration.yaml file:

Example configuration.yaml entry

humidifier: 
  - platform: switch_humidifier
    name: Switch Deshumidifier
    switch_id: switch.deshumidifier
    sensor_id: sensor.humidity
    type: dehumidifier

Parameters

  • name (Optional): The platform name
  • switch_id (Required): The switch entintity id
  • sensor_id (Required): The humidity sensor entintity
  • type (Optional): Posible values are humidifier or dehumidifier
    • Default: dehumidifier

It also support homekit.

Homekit

To use with homekit you need to especify the humidity sensor as linked_humidity_sensor in the entity_config

homekit:
- filter:
    include_entities:
      - humidifier.switch_humidifier
      - sensor.humidity
  entity_config:
    humidifier.switch_humidifier:
      linked_humidity_sensor: sensor.humidity
4 Likes

This is great, just what I’ve been looking for. Thank you for your hard work.

@adrianBv it looks like home assistant doesn’t like the “linked_humidity_sensor:” portion of the HomeKit setup. Do you know of another way of linking the humid sensor to the switch for HomeKit?

Thank you!