Skip to content

Commit

Permalink
merged heat_cool changes for code and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
david-kalbermatten committed Jun 4, 2021
2 parents f28ba02 + d8676fb commit cc81db0
Show file tree
Hide file tree
Showing 6 changed files with 255 additions and 50 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,7 @@ venv.bak/
.mypy_cache/

# Build Artifacts
._*
._*

# JetBrains IDE
.idea
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ climate:
dryer: switch.dryer
dryer_behavior: cooler
target_sensor: sensor.temperature_sensor
reverse_cycle: cooler, heater
min_temp: 16
max_temp: 30
cold_tolerance: 0.8
Expand All @@ -50,24 +51,27 @@ dryer_behavior: [cooler, neutral, heater] # <-- only one
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 a few exceptions:
The component shares the same configuration variables as the standard `generic_thermostat`, with some exceptions:
* A `cooler` variable has been added where you can specify the `entity_id` of your switch for a cooling unit (AC, fan, etc).
* A `fan` and `dryer` variable have been added where you can specify the `entity_id`s of your switches for a fan and/or dryer unit.
* I basically made all the `switches`/`input_booleans` optional, so the user can decide which modes he wants to use (my HVAC only supports `Cool`, `Dry`, `Fan_only`). This together with `template_switches` makes for a great way to make my HVAC controllable via IR.
* If the your climate unit offers multiple modes (e.g. a reverse cycle air conditioner) setting `reverse_cycle` to `cooler, heater` will ensure the device isn't switched off entirely when switching modes
* The `ac_mode` variable has been removed, since it makes no sense for this use case.
* `target_temp_high` and `target_temp_low` set the default value for the upper and lower setting for temperature range when in `HEAT_COOL` mode

Refer to the [Generic Thermostat documentation](https://www.home-assistant.io/components/generic_thermostat/) for details on the rest of the variables. This component doesn't change their functionality.

## Behavior

* The thermostat will follow standard mode-based behavior: if set to "cool," the only switch which can be activated is the `cooler`. This means if the target temperature is higher than the actual temperateure, the `heater` will _not_ start. Vice versa is also true.
* For `HEAT` or `COOL` modes, the thermostat will follow standard mode-based behavior: if set to "cool," the only switch which can be activated is the `cooler`. This means if the target temperature is higher than the actual temperateure, the `heater` will _not_ start. Vice versa is also true.

* For `HEAT_COOL` mode, the thermostat will attempt to maintain the temperature within the set range, turning on the configured heater when the temperature drops below the bottom of the range by `cold_tolerance` and turning on the configured cooler when the temperature rises above the top of the set range by the `hot_tolerance` amount. When the measured temperature is within the configured range by `(hot|cold)_tolerance` the thermostat will transition to idle mode and both heater and cooler will be turned off.

* Keepalive logic has been updated to be aware of the mode in current use, so should function as expected.

* By default, the component will restore the last state of the thermostat prior to a restart.

* While `heater`/`cooler`/`dryer`/`fan` are documented to be `switch`es, they can also be `input_boolean`s if necessary.
* While `heater`/`cooler`/`dryer`/`fan` are documented to be `switch`es, they can also be `input_boolean`s if necessary. Note that these are assumed to be exclusively for the use of the thermostat - the thermostat will report its mode and change its behaviour based on the position of these switches.


## Reporting an Issue
Expand Down
4 changes: 4 additions & 0 deletions custom_components/dualmode_generic/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""The dualmode_generic thermostat component."""

DOMAIN = "dualmode_generic"
PLATFORMS = ["climate"]
Loading

0 comments on commit cc81db0

Please sign in to comment.