Bugfix new async_add_devices function (#6362)

This commit is contained in:
Pascal Vizeli 2017-03-02 17:27:45 +01:00 committed by GitHub
parent 3fa8aff78e
commit a5b2fc9759
2 changed files with 4 additions and 6 deletions

View File

@ -44,8 +44,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Setup the Apple TV platform."""
import pyatv
@ -79,7 +78,7 @@ def async_setup_platform(hass, config, async_add_entities,
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
yield from async_add_entities([entity])
async_add_devices([entity])
class AppleTvDevice(MediaPlayerDevice):

View File

@ -60,8 +60,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Setup the Kodi platform."""
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)
@ -84,7 +83,7 @@ def async_setup_platform(hass, config, async_add_entities,
password=config.get(CONF_PASSWORD),
turn_off_action=config.get(CONF_TURN_OFF_ACTION), websocket=websocket)
yield from async_add_entities([entity], update_before_add=True)
async_add_devices([entity], update_before_add=True)
class KodiDevice(MediaPlayerDevice):