From 5297271d3ab3ddf85cc06296548c8bf0912d5646 Mon Sep 17 00:00:00 2001 From: Sam Birch Date: Tue, 3 Oct 2017 04:00:16 +1300 Subject: [PATCH] Update threshold sensor docs for new hysteresis attribute (#3449) * Update threshold sensor docs for new hysteresis attribute * Added default and changed wording * Keep configuration sample minimal * Add comment from code --- source/_components/binary_sensor.threshold.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/_components/binary_sensor.threshold.markdown b/source/_components/binary_sensor.threshold.markdown index 025b2f2c064..c2e9e875b39 100644 --- a/source/_components/binary_sensor.threshold.markdown +++ b/source/_components/binary_sensor.threshold.markdown @@ -14,7 +14,9 @@ ha_release: 0.34 --- -The `threshold` binary sensor platform is consuming the state from another sensor. If the value is below (`lower`) or higher (`upper`) than the given threshold then state of this sensor change.. +The `threshold` binary sensor platform observes the state of another sensor. If the value is below (`lower`) or higher (`upper`) than the given threshold then state of the threshold sensor is changed. + +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 `lower` or `upper` with respect to the threshold. It's an alternative to the template binary sensor's `value_template:` to get the abnormal/too high/too low states. @@ -36,7 +38,7 @@ binary_sensor: Configuration variables: - **entity_id** (*Required*): The entity to monitor. Only [sensors](/components/sensor/) are supported. -- **threshold** (*Required*): The value which is the threshold. +- **threshold** (*Required*): The threshold which the observed value is compared against. - **type** (*Required*): `lower` if the value needs to be below the threshold or `upper` if higher. +- **hysteresis** (*Optional*): The distance the observed value must be from the threshold before the state is changed. Defaults to `0.0` - **name** (*Optional*): Name of the sensor to use in the frontend. Defaults to `Stats`. -