add_devices -> add_entities (#16171)

* add_devices -> add_entities

* Lint

* PyLint

* Revert external method in scsgate
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-08-24 16:37:30 +02:00
1 parent 37fd438717
commit 994b829cb4
839 files changed
+2121 -2008

No files matched your search

@@ -15,13 +15,13 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
DEPENDENCIES = ['deconz']
async def async_setup_platform(hass, config, async_add_devices,
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Old way of setting up deCONZ binary sensors."""
pass
async def async_setup_entry(hass, config_entry, async_add_devices):
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the deCONZ binary sensor."""
@callback
def async_add_sensor(sensors):
@@ -33,7 +33,7 @@ async def async_setup_entry(hass, config_entry, async_add_devices):
if sensor.type in DECONZ_BINARY_SENSOR and \
not (not allow_clip_sensor and sensor.type.startswith('CLIP')):
entities.append(DeconzBinarySensor(sensor))
async_add_devices(entities, True)
async_add_entities(entities, True)
hass.data[DATA_DECONZ_UNSUB].append(
async_dispatcher_connect(hass, 'deconz_new_sensor', async_add_sensor))