mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 02:07:15 +00:00
Add threshold sensor docs (#1511)
This commit is contained in:
parent
1195a690c5
commit
347d12578c
42
source/_components/binary_sensor.threshold.markdown
Normal file
42
source/_components/binary_sensor.threshold.markdown
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "Threshold Binary Sensor"
|
||||||
|
description: "Instructions how to integrate threshold binary sensors into Home Assistant."
|
||||||
|
date: 2016-11-26 12:10
|
||||||
|
sidebar: true
|
||||||
|
comments: false
|
||||||
|
sharing: true
|
||||||
|
footer: true
|
||||||
|
logo: home-assistant.png
|
||||||
|
ha_category: Binary Sensor
|
||||||
|
ha_iot_class: "Local Polling"
|
||||||
|
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..
|
||||||
|
|
||||||
|
It's an alternative to the template binary sensor's `value_template:` to get the abnormal/too high/too low states.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
{% raw %}{{ states.sensor.furnace.state > 2.5 }}{% endraw %}
|
||||||
|
```
|
||||||
|
|
||||||
|
To enable the threshold sensor, add the following lines to your `configuration.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
sensor:
|
||||||
|
- platform: threshold
|
||||||
|
threshold: 15
|
||||||
|
type: lower
|
||||||
|
entity_id: sensor.random
|
||||||
|
```
|
||||||
|
|
||||||
|
Configuration variables:
|
||||||
|
|
||||||
|
- **entity_id** (*Required*): The entity to monitor. Only [sensors](/components/sensor/) are supported.
|
||||||
|
- **threshold** (*Required*): The value which is the threshold.
|
||||||
|
- **type** (*Required*): `lower` if the value needs to be below the threshold or `upper` if higher.
|
||||||
|
- **name** (*Optional*): Name of the sensor to use in the frontend. Defaults to `Stats`.
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user