mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 00:18:11 +01:00
Fix OrFilter
This commit is contained in:
parent
084fc00517
commit
2f98adca49
1 changed files with 5 additions and 2 deletions
|
@ -117,7 +117,10 @@ def setup_filter(config):
|
|||
elif CONF_DELTA in config:
|
||||
yield DeltaFilter.new(config[CONF_DELTA])
|
||||
elif CONF_OR in config:
|
||||
yield OrFilter.new(setup_filters(config[CONF_OR]))
|
||||
filters = None
|
||||
for filters in setup_filters(config[CONF_OR]):
|
||||
yield None
|
||||
yield OrFilter.new(filters)
|
||||
elif CONF_HEARTBEAT in config:
|
||||
yield App.register_component(HeartbeatFilter.new(config[CONF_HEARTBEAT]))
|
||||
elif CONF_DEBOUNCE in config:
|
||||
|
@ -131,7 +134,7 @@ def setup_filters(config):
|
|||
for conf in config:
|
||||
filter = None
|
||||
for filter in setup_filter(conf):
|
||||
yield
|
||||
yield None
|
||||
filters.append(filter)
|
||||
yield ArrayInitializer(*filters)
|
||||
|
||||
|
|
Loading…
Reference in a new issue