Skip to content

Commit

Permalink
Fix fastled lambda light effect
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoWinter committed Nov 15, 2018
1 parent 70def85 commit f394968
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esphomeyaml/components/light/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
MakeLight = Application.struct('MakeLight')
LightOutput = light_ns.class_('LightOutput')
FastLEDLightOutputComponent = light_ns.class_('FastLEDLightOutputComponent', LightOutput)
FastLEDLightOutputComponentRef = FastLEDLightOutputComponent.operator('ref')

# Actions
ToggleAction = light_ns.class_('ToggleAction', Action)
Expand Down Expand Up @@ -249,8 +250,7 @@ def build_effect(full_config):
add(effect.set_intensity(config[CONF_INTENSITY]))
yield effect
elif key == CONF_FASTLED_LAMBDA:
lambda_ = None
args = [(RawExpression('FastLEDLightOutputComponent &'), 'it')]
args = [(FastLEDLightOutputComponentRef, 'it')]
for lambda_ in process_lambda(config[CONF_LAMBDA], args):
yield None
yield FastLEDLambdaLightEffect.new(config[CONF_NAME], lambda_, config[CONF_UPDATE_INTERVAL])
Expand Down

0 comments on commit f394968

Please sign in to comment.