zacs / ha-dualmodegeneric

Generic thermostat capable of heating and cooling
68 stars 26 forks source link
home-assistant home-assistant-component

Home Assistant - Dual Mode Generic Thermostat

Special thanks to shandoosheri for getting this to work on older versions of Home Assistant, which gave me an easy blueprint to follow. And thanks @kevinvincent for writing a nice custom_component readme for me to fork.

This component is a straightfoward fork of the mainline generic_thermostat.

Installation (HACS) - Recommended

  1. Have HACS installed, this will allow you to easily update
  2. Add https://github.com/zacs/ha-dualmodegeneric as a custom repository as Type: Integration
  3. Click install under "Dual Mode Generic Thermostat", restart your instance.

Installation (Manual)

  1. Download this repository as a ZIP (green button, top right) and unzip the archive
  2. Copy /custom_components/dualmode_generic to your <config_dir>/custom_components/ directory
    • You will need to create the custom_components folder if it does not exist
    • On Hassio the final location will be /config/custom_components/dualmode_generic
    • On Hassbian the final location will be /home/homeassistant/.homeassistant/custom_components/dualmode_generic

Configuration

Add the following to your configuration file

Example Config

climate:
  - platform: dualmode_generic
    name: My Thermostat
    unique_id: climate.my_thermostat
    heater: switch.heater
    cooler: switch.cooler
    fan: switch.fan
    fan_behavior: cooler
    dryer: switch.dryer
    dryer_behavior: cooler
    target_sensor: sensor.temperature_sensor
    reverse_cycle: cooler, heater
    enable_heat_cool: True
    min_temp: 16
    max_temp: 30
    cold_tolerance: 0.8
    hot_tolerance: 0.4
    min_cycle_duration:
        minutes: 20

Possible values for *_behavior

fan_behavior: [cooler, neutral, heater] # <-- only one
dryer_behavior: [cooler, neutral, heater] # <-- only one

Possible values for reverse_cycle

reverse_cycle: cooler, heater, dryer, fan # <-- multiple are possible, (True/False) are still valid for backward compatibility

The component shares the same configuration variables as the standard generic_thermostat, with some exceptions:

Refer to the Generic Thermostat documentation for details on the rest of the variables. This component doesn't change their functionality.

Behavior

Reporting an Issue

  1. Setup your logger to print debug messages for this component using:
    logger:
    default: info
    logs:
    custom_components.dualmode_generic: debug
  2. Restart HA
  3. Verify you're still having the issue
  4. File an issue in this Github Repository containing your HA log (Developer section > Info > Load Full Home Assistant Log)
    • You can paste your log file at pastebin https://pastebin.com/ and submit a link.
    • Please include details about your setup (Pi, NUC, etc, docker?, HASSOS?)
    • The log file can also be found at /<config_dir>/home-assistant.log