From cf264a274343a3c5f05274c54c76bd268a9a0c72 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Thu, 27 Sep 2018 16:34:02 +0200 Subject: [PATCH] Fix binary sensor heartbeat not working (#130) --- esphomeyaml/components/binary_sensor/__init__.py | 2 +- tests/test1.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/esphomeyaml/components/binary_sensor/__init__.py b/esphomeyaml/components/binary_sensor/__init__.py index f83416d85b..92d579d18b 100644 --- a/esphomeyaml/components/binary_sensor/__init__.py +++ b/esphomeyaml/components/binary_sensor/__init__.py @@ -33,7 +33,7 @@ DelayedOffFilter = binary_sensor_ns.DelayedOffFilter HeartbeatFilter = binary_sensor_ns.HeartbeatFilter MQTTBinarySensorComponent = binary_sensor_ns.MQTTBinarySensorComponent -FILTER_KEYS = [CONF_INVERT, CONF_DELAYED_ON, CONF_DELAYED_OFF, CONF_LAMBDA] +FILTER_KEYS = [CONF_INVERT, CONF_DELAYED_ON, CONF_DELAYED_OFF, CONF_LAMBDA, CONF_HEARTBEAT] FILTERS_SCHEMA = vol.All(cv.ensure_list, [vol.All({ vol.Optional(CONF_INVERT): None, diff --git a/tests/test1.yaml b/tests/test1.yaml index eed12b511f..626f660c19 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -444,6 +444,7 @@ binary_sensor: - invert: - delayed_on: 40ms - delayed_off: 40ms + - heartbeat: 1s on_press: then: - lambda: >-