From ff3af64cd6c7bc05cbd0e2770d01b6e882919380 Mon Sep 17 00:00:00 2001 From: Andrew Marks Date: Thu, 27 Aug 2020 15:02:23 -0400 Subject: [PATCH] Improve water heater (#625) * Update Water Heater Entity documentation to match WaterHeaterEntity * Remove IDE file * Add target_temperature_high/low * Fix typo * Fix another typo * Use temperature unit constants * Fix default for NotImplementedError properties * Update docs/core/entity/water-heater.md Co-authored-by: Martin Hjelmare * Update docs/core/entity/water-heater.md Co-authored-by: Martin Hjelmare * Update docs/core/entity/water-heater.md Co-authored-by: Martin Hjelmare Co-authored-by: Martin Hjelmare --- docs/core/entity/water-heater.md | 33 ++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/docs/core/entity/water-heater.md b/docs/core/entity/water-heater.md index d16cbf66..7a0e9944 100644 --- a/docs/core/entity/water-heater.md +++ b/docs/core/entity/water-heater.md @@ -9,18 +9,23 @@ sidebar_label: Water Heater Properties should always only return information from memory and not do I/O (like network requests). Implement `update()` or `async_update()` to fetch data. ::: -| Name | Type | Default | Description -| ---- | ---- | ------- | ----------- -| min_temp | float | 110°F | The minimum temperature that can be set. -| max_temp | float | 140°F | The maximum temperature that can be set. -| temperature | float | none | The current temperature in °C or °F. -| operation_mode | string | none | The current operation mode. -| operation_list | list | none | List of possible operation modes. -| away_mode | string | none | The current status of away mode. (on, off) +| Name | Type | Default | Description +| --------------------- | ----------- | --------- | ----------- +| `min_temp` | `float` | 110°F | The minimum temperature that can be set. +| `max_temp` | `float` | 140°F | The maximum temperature that can be set. +| `current_temperature` | `float` | `None` | The current temperature. +| `target_temperature` | `float` | `None` | The temperature we are trying to reach. +| `target_temperature_high` | `float` | `None` | Upper bound of the temperature we are trying to reach. +| `target_temperature_low` | `float` | `None` | Lower bound of the temperature we are trying to reach. +| `temperature_unit` | `str` | `NotImplementedError` | One of `TEMP_CELSIUS`, `TEMP_FAHRENHEIT`, or `TEMP_KELVIN`. +| `current_operation` | `string` | `None` | The current operation mode. +| `operation_list` | `List[str]` | `None` | List of possible operation modes. +| `supported_features` | `List[str]` | `NotImplementedError` | List of supported features. +| `is_away_mode_on` | `bool` | `None` | The current status of away mode. -The allowed operation modes are specified in the base component and implementations of the water_heater component cannot differ. +The allowed operation modes are the states specified in the base component and implementations of the water_heater component cannot differ. -Properties have to follow the units defined in the `unit_system`. +Properties have to follow the units defined in the `temperature_unit`. ## States @@ -34,6 +39,14 @@ Properties have to follow the units defined in the `unit_system`. | `STATE_GAS` | Gas only mode, uses the most energy. | `STATE_OFF` | The water heater is off. +## Supported Features + +| Feature | Description +| ---------------------------- | ----------- +| `SUPPORT_TARGET_TEMPERATURE` | Temperature can be set +| `SUPPORT_OPERATION_MODE` | Operation mode can be set +| `SUPPORT_AWAY_MODE` | Away mode can be set + ## Methods ### `set_temperature` or `async_set_temperature`