mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-20 03:11:17 +02:00
Add doc for delayed_on_off binary_sensor filter (#324)
* add doc for delayed_on_off binary_sensor filter * added delayed_on_off yaml example
This commit is contained in:
parent
87327c6b34
commit
deb2559be6
@ -77,6 +77,7 @@ of these entries matters!)
|
||||
- invert:
|
||||
- delayed_on: 100ms
|
||||
- delayed_off: 100ms
|
||||
- delayed_on_off: 100ms
|
||||
- lambda: |-
|
||||
if (id(other_binary_sensor).state) {
|
||||
return x;
|
||||
@ -95,6 +96,9 @@ Supported filters:
|
||||
an OFF state. If an ON value is received while waiting, the OFF action is discarded. Or in other words:
|
||||
Only send an OFF value if the binary sensor has stayed OFF for at least the specified time period.
|
||||
**Useful for debouncing push buttons**.
|
||||
- **delayed_on_off**: Only send an ON or OFF value if the binary sensor has stayed in the same state
|
||||
for at least the specified time period.
|
||||
**Useful for debouncing binary switches**.
|
||||
- **lambda**: Specify any :ref:`lambda <config-lambda>` for more complex filters. The input value from
|
||||
the binary sensor is ``x`` and you can return ``true`` for ON, ``false`` for OFF, and ``{}`` to stop
|
||||
the filter chain.
|
||||
|
Loading…
Reference in New Issue
Block a user