mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Autorepeat filter for the binary sensors (#1681)
* add the autorepeat filter * add a test for the autorepeat filter * make no timing equivalent to a single default one
This commit is contained in:
@@ -86,6 +86,20 @@ binary_sensor:
|
||||
- platform: tuya
|
||||
id: tuya_binary_sensor
|
||||
sensor_datapoint: 1
|
||||
- platform: template
|
||||
id: ar1
|
||||
lambda: 'return {};'
|
||||
filters:
|
||||
- autorepeat:
|
||||
- delay: 2s
|
||||
time_off: 100ms
|
||||
time_on: 900ms
|
||||
- delay: 4s
|
||||
time_off: 100ms
|
||||
time_on: 400ms
|
||||
on_state:
|
||||
then:
|
||||
- lambda: 'ESP_LOGI("ar1:", "%d", x);'
|
||||
|
||||
climate:
|
||||
- platform: tuya
|
||||
|
||||
Reference in New Issue
Block a user