Skip to content

Revert "Add delay feature to Threshold sensor" #3311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 1 addition & 34 deletions source/_components/binary_sensor.threshold.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sharing: true
footer: true
logo: home-assistant.png
ha_category: Binary Sensor
ha_iot_class: "Local Push"
ha_iot_class: "Local Polling"
ha_release: 0.34
---

Expand All @@ -31,18 +31,6 @@ binary_sensor:
threshold: 15
type: lower
entity_id: sensor.random

# If present, sensor will only switch to on if the threshold is met for this amount of time.
on_delay:
hours: 1
minutes: 10
seconds: 5

# Same as above, but for the sensor switching to off.
off_delay:
hours: 1
minutes: 10
seconds: 5
```

Configuration variables:
Expand All @@ -51,25 +39,4 @@ Configuration variables:
- **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`.
- **on_delay** (*Optional*): The amount of time the threshold must be met before this sensor will switch to on.
- **off_delay** (*Optional*): The amount of time the threshold must be not met before this sensor will switch to off.

## {% linkable_title Examples %}

In this section you find some real life examples of how to use this sensor.

### {% linkable_title Washing Machine Running %}

This example creates a washing machine "load running" sensor by monitoring an energy meter connected to the washer. During the washer's operation, the energy meter will fluctuate wildly, hitting zero frequently even before the load is finished. By utilizing `off_delay`, we can have this sensor only turn off if there has been no washer activity for 5 minutes.

```yaml
# Determine when the washing machine has a load running.
binary_sensor:
- platform: threshold
name: Washing Machine
threshold: 0
type: upper
entity_id: sensor.washing_machine_power
off_delay:
minutes: 5
```