Simplify coroutine syntax (#503)

* Simplify coroutine syntax

* More

* Lint

* Fix

* More

* Lint
This commit is contained in:
Otto Winter
2019-04-09 14:30:12 +02:00
committed by GitHub
parent e90829eef2
commit be5330b6ae
103 changed files with 351 additions and 588 deletions
+1 -2
View File
@@ -68,8 +68,7 @@ def to_code(config):
add(fast_led.set_max_refresh_rate(config[CONF_MAX_REFRESH_RATE]))
if CONF_POWER_SUPPLY in config:
for power_supply in get_variable(config[CONF_POWER_SUPPLY]):
yield
power_supply = yield get_variable(config[CONF_POWER_SUPPLY])
add(fast_led.set_power_supply(power_supply))
light.setup_light(make.Pstate, make.Pfast_led, config)