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
@@ -30,8 +30,7 @@ PLATFORM_SCHEMA = sensor.PLATFORM_SCHEMA.extend({
def to_code(config):
for uart_ in get_variable(config[CONF_UART_ID]):
yield
uart_ = yield get_variable(config[CONF_UART_ID])
rhs = App.make_mhz19_sensor(uart_, config[CONF_CO2][CONF_NAME],
config.get(CONF_UPDATE_INTERVAL))
mhz19 = Pvariable(config[CONF_ID], rhs)