diff --git a/esphomeyaml/components/binary_sensor/__init__.py b/esphomeyaml/components/binary_sensor/__init__.py index 6e08acd9d6..e8664566f0 100644 --- a/esphomeyaml/components/binary_sensor/__init__.py +++ b/esphomeyaml/components/binary_sensor/__init__.py @@ -60,8 +60,9 @@ FILTERS_SCHEMA = cv.ensure_list({ vol.Optional(CONF_INVERT): None, vol.Optional(CONF_DELAYED_ON): cv.positive_time_period_milliseconds, vol.Optional(CONF_DELAYED_OFF): cv.positive_time_period_milliseconds, - vol.Optional(CONF_HEARTBEAT): cv.positive_time_period_milliseconds, vol.Optional(CONF_LAMBDA): cv.lambda_, + + vol.Optional(CONF_HEARTBEAT): cv.invalid("The heartbeat filter has been removed in 1.11.0"), }, cv.has_exactly_one_key(*FILTER_KEYS)) MULTI_CLICK_TIMING_SCHEMA = vol.Schema({ @@ -205,8 +206,6 @@ def setup_filter(config): yield App.register_component(DelayedOffFilter.new(config[CONF_DELAYED_OFF])) elif CONF_DELAYED_ON in config: yield App.register_component(DelayedOnFilter.new(config[CONF_DELAYED_ON])) - elif CONF_HEARTBEAT in config: - yield App.register_component(HeartbeatFilter.new(config[CONF_HEARTBEAT])) elif CONF_LAMBDA in config: for lambda_ in process_lambda(config[CONF_LAMBDA], [(bool_, 'x')], return_type=optional.template(bool_)): diff --git a/esphomeyaml/components/sensor/__init__.py b/esphomeyaml/components/sensor/__init__.py index f19571c457..99a48d73c0 100644 --- a/esphomeyaml/components/sensor/__init__.py +++ b/esphomeyaml/components/sensor/__init__.py @@ -161,7 +161,6 @@ def setup_filter(config): def setup_filters(config): filters = [] for conf in config: - filter = None for filter in setup_filter(conf): yield None filters.append(filter) @@ -178,7 +177,6 @@ def setup_sensor_core_(sensor_var, mqtt_var, config): if CONF_ACCURACY_DECIMALS in config: add(sensor_var.set_accuracy_decimals(config[CONF_ACCURACY_DECIMALS])) if CONF_FILTERS in config: - filters = None for filters in setup_filters(config[CONF_FILTERS]): yield add(sensor_var.set_filters(filters)) diff --git a/tests/test1.yaml b/tests/test1.yaml index 7694dbb973..fdc2b76492 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -481,7 +481,6 @@ binary_sensor: - invert: - delayed_on: 40ms - delayed_off: 40ms - - heartbeat: 1s on_press: then: - lambda: >-