Async cleanups with new handling and executor (#4234)
This commit is contained in:
1 parent
ad8645baf4
commit
382ac5c3b5
8 files changed
+15
-17
No files matched your search
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user