renamed add_devices to async_add_devices according to hass naming scheme (#9485)
* renamed add_devices to async_add_devices according to hass naming scheme * replaced some occurencies of async_add_entites to async_add_devices * fixed unit test * fixed unit test
This commit is contained in:
1 parent
185ada2354
commit
a5a970709f
12 files changed
+55
-57
No files matched your search
@@ -41,14 +41,14 @@ def _create_sensor(hass, zone):
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_setup_platform(hass, config, async_add_entities,
|
||||
def async_setup_platform(hass, config, async_add_devices,
|
||||
discovery_info=None):
|
||||
"""Initialize the platform."""
|
||||
if (discovery_info is None or
|
||||
discovery_info[ATTR_DISCOVER_DEVICES] is None):
|
||||
return
|
||||
|
||||
async_add_entities(
|
||||
async_add_devices(
|
||||
_create_sensor(hass, zone)
|
||||
for zone in discovery_info[ATTR_DISCOVER_DEVICES]
|
||||
if _get_device_class(zone['type']))
|
||||
|
||||
Reference in new issue
Block a user