Threshold
The Threshold integration observes the state of another sensor. If the value is below or higher than the given threshold, then the state of the threshold sensor is changed. It also supports a range if both the upper and lower limits are given.
If the sensor is configured with no hysteresis and the sensor value is equal to the threshold, the sensor is turned off since it is not upper or lower with respect to the threshold.
此集成可通过 UI 配置。前往 设置 > 设备与服务 添加。
YAML configuration
Alternatively, this integration can be configured and set up manually via YAML
instead. To enable the Integration sensor in your installation, add the
following to your "configuration.yaml" file:
Matrix of state change behavior
Sensor value rising
Sensor value falling
Examples
Is the temperature rising or falling
The hysteresis parameter can be used in this use-case to avoid frequent state changes around the maximum or the minimum of a temperature curve. We also have to utilize the derivative sensor for this use-case:

