Async cleanups with new handling and executor (#4234)

This commit is contained in:
Pascal Vizeli authored and GitHub committed 2016-11-06 01:01:03 +01:00
1 parent ad8645baf4
commit 382ac5c3b5
8 files changed
+15 -17

No files matched your search

+1 -2
View File
@@ -36,8 +36,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
minimum = config.get(CONF_MINIMUM)
maximum = config.get(CONF_MAXIMUM)
hass.loop.create_task(async_add_devices(
[RandomSensor(name, minimum, maximum)], True))
yield from async_add_devices([RandomSensor(name, minimum, maximum)], True)
return True