Remove deprecated settings and document new default_preset (#2292)

* Remove deprecated settings and document new default_preset

* Lint fixes

* More lint fixes

* Index note

* Fix incorrect plural
This commit is contained in:
Michael Davidson 2022-09-26 12:59:08 +10:00 committed by GitHub
parent 455d28e595
commit 6873e425d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,8 +52,6 @@ modes that Home Assistant offers.
- platform: thermostat
name: "Thermostat Climate Controller"
sensor: my_temperature_sensor
default_target_temperature_low: 20 °C
default_target_temperature_high: 22 °C
min_cooling_off_time: 300s
min_cooling_run_time: 300s
min_heating_off_time: 300s
@ -66,6 +64,11 @@ modes that Home Assistant offers.
idle_action:
- switch.turn_off: air_cond
- switch.turn_off: heater
default_preset: Home
preset:
- name: Home
default_target_temperature_low: 20 °C
default_target_temperature_high: 22 °C
.. code-block:: yaml
@ -74,7 +77,6 @@ modes that Home Assistant offers.
- platform: thermostat
name: "Thermostat Climate Controller"
sensor: my_temperature_sensor
default_target_temperature_low: 20 °C
min_heating_off_time: 300s
min_heating_run_time: 300s
min_idle_time: 30s
@ -82,6 +84,11 @@ modes that Home Assistant offers.
- switch.turn_on: heater
idle_action:
- switch.turn_off: heater
default_preset: Home
preset:
- name: Home
default_target_temperature_low: 20 °C
.. code-block:: yaml
@ -90,7 +97,6 @@ modes that Home Assistant offers.
- platform: thermostat
name: "Thermostat Climate Controller"
sensor: my_temperature_sensor
default_target_temperature_high: 22 °C
min_cooling_off_time: 300s
min_cooling_run_time: 300s
min_idle_time: 30s
@ -98,6 +104,11 @@ modes that Home Assistant offers.
- switch.turn_on: air_cond
idle_action:
- switch.turn_off: air_cond
default_preset: Home
preset:
- name: Home
default_target_temperature_high: 22 °C
Controller Behavior and Hysteresis
@ -158,45 +169,6 @@ The thermostat controller uses the sensor to determine whether it should heat or
- **sensor** (**Required**, :ref:`config-id`): The sensor that is used to measure the current temperature.
Default Target Temperatures and Mode
************************************
These configuration items determine default values the thermostat controller should use when it starts.
- **default_mode** (*Optional*, *Deprecated*, climate mode): The default climate mode the controller should
use if it is unable to restore it from memory. One of:
- ``off`` (default)
- ``heat_cool``
- ``cool``
- ``heat``
- ``dry``
- ``fan_only``
- ``auto``
This value is used the first time your device starts after ESPHome is initially installed onto it. Add
this option into your configuration if you want your thermostat component to start in a climate mode other
than ``off``. If this option is not configured, you'll need to manually change the climate mode later via
the front end (Home Assistant), an ESPHome action, automation, or from within a lambda elsewhere in your
device's configuration.
- **default_target_temperature_low** (*Optional*, *Deprecated*, float): The default low target
temperature for the control algorithm. This can be dynamically set in the frontend later.
- **default_target_temperature_high** (*Optional*, *Deprecated*, float): The default high target
temperature for the control algorithm. This can be dynamically set in the frontend later.
**At least one of** ``default_target_temperature_low`` **and** ``default_target_temperature_high``
**must be specified.**
.. note::
**default_mode**, **default_target_temperature_low**, and **default_target_temperature_high** are
deprecated and will be removed in a future release. You should migrate your configuration to using
a :ref:`preset <thermostat-preset>` which allows for more flexibility and customisation
Note that ``min_temperature`` and ``max_temperature`` from the base climate component are used to define
the range of allowed temperature values in the thermostat component. See :doc:`/components/climate/index`.
Heating and Cooling Actions
***************************
@ -315,22 +287,6 @@ Set Point Options/Behavior
- **supplemental_heating_delta** (*Required with* ``supplemental_heating_action``, float): When the temperature
difference between the lower set point and the current temperature exceeds this value,
``supplemental_heating_action`` will be called immediately.
- **away_config** (*Optional*, *Deprecated*): Additionally specify target temperature range settings for away mode.
Away mode can be used to have a second set of target temperatures (for example, while the user is
away or sleeping/at night).
- **default_target_temperature_low** (*Optional*, float): The default low target temperature for the control
algorithm when Away mode is selected. This can be dynamically set in the frontend later.
- **default_target_temperature_high** (*Optional*, float): The default high target temperature for the control
algorithm when Away mode is selected. This can be dynamically set in the frontend later.
**If configured, at least one of** ``default_target_temperature_low`` **and** ``default_target_temperature_high``
**must be specified in the away mode configuration.**
.. note::
**away_config** is deprecated and will be removed in a future release. You should migrate your configuration
to using a :ref:`preset <thermostat-preset>` which allows for more flexibility and customisation
.. _thermostat-preset:
@ -422,6 +378,67 @@ experience and automation.
preset_change:
- logger.log: Preset has been changed!
Default Preset
**************
These configuration items determine default values the thermostat controller should use when it starts.
- **default_preset** (*Optional*, string): The name of the preset to use by default. Must match a preset
as per :ref:`preset <thermostat-preset>`.
- **on_boot_restore_from**: (*Optional*, on_boot_restore_from): Controls what the thermostat will do when
it first boots. One of:
- ``memory`` (default): The thermostat will restore any settings from last time it was running.
- ``default_preset``: The thermostat will always switch to the preset specified by **default_preset**
.. note::
You can specify a ``default_preset`` and set ``on_boot_restore_from`` to ``memory``. In this mode when
the settings from last boot cannot be retrieved, for any reason, then the specified ``default_preset``
will be applied.
.. code-block:: yaml
# This climate controller, on first boot, will switch to "My Startup Preset". Subsequent boots would
# restore to whatever mode it was in prior to the reboot
climate:
- platform: thermostat
name: "From Memory Thermostat"
default_preset: My Startup Preset
on_boot_restore_from: memory
preset:
- name: My Startup Preset
default_target_temperature_low: 17
default_target_temperature_high: 26
fan_mode: OFF
swing_mode: OFF
mode: OFF
# Custom preset
- name: A custom preset
default_target_temperature_low: 21
default_target_temperature_high: 23
fan_mode: HIGH
mode: HEAT_COOL
# This climate controller will always switch to "Every Start Preset"
climate:
- platform: thermostat
name: "Default Preset Thermostat"
default_preset: Every Start Preset
on_boot_restore_from: default_preset
preset:
- name: Every Start Preset
default_target_temperature_low: 17
default_target_temperature_high: 26
fan_mode: OFF
swing_mode: OFF
mode: OFF
# Custom preset
- name: A custom preset
default_target_temperature_low: 21
default_target_temperature_high: 23
fan_mode: HIGH
mode: HEAT_COOL
Additional Actions/Behavior
***************************