add_devices -> add_entities (#16171)

* add_devices -> add_entities

* Lint

* PyLint

* Revert external method in scsgate
This commit is contained in:
Paulus Schoutsen 2018-08-24 16:37:30 +02:00 committed by GitHub
parent 37fd438717
commit 994b829cb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
839 changed files with 2121 additions and 2008 deletions

View file

@ -142,9 +142,9 @@ class TestHelpersEntityPlatform(unittest.TestCase):
'async_track_time_interval')
def test_set_scan_interval_via_platform(self, mock_track):
"""Test the setting of the scan interval via platform."""
def platform_setup(hass, config, add_devices, discovery_info=None):
def platform_setup(hass, config, add_entities, discovery_info=None):
"""Test the platform setup."""
add_devices([MockEntity(should_poll=True)])
add_entities([MockEntity(should_poll=True)])
platform = MockPlatform(platform_setup)
platform.SCAN_INTERVAL = timedelta(seconds=30)
@ -520,9 +520,9 @@ async def test_setup_entry(hass):
"""Test we can setup an entry."""
registry = mock_registry(hass)
async def async_setup_entry(hass, config_entry, async_add_devices):
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Mock setup entry method."""
async_add_devices([
async_add_entities([
MockEntity(name='test1', unique_id='unique')
])
return True