Custom component loading cleanup (#14211)

* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-05-01 20:57:30 +02:00
1 parent 5d96751168
commit 83d300fd11
50 files changed
+315 -392

No files matched your search

+3 -3
View File
@@ -118,7 +118,7 @@ class TestLight(unittest.TestCase):
def test_services(self):
"""Test the provided services."""
platform = loader.get_component('light.test')
platform = loader.get_component(self.hass, 'light.test')
platform.init()
self.assertTrue(
@@ -267,7 +267,7 @@ class TestLight(unittest.TestCase):
def test_broken_light_profiles(self):
"""Test light profiles."""
platform = loader.get_component('light.test')
platform = loader.get_component(self.hass, 'light.test')
platform.init()
user_light_file = self.hass.config.path(light.LIGHT_PROFILES_FILE)
@@ -282,7 +282,7 @@ class TestLight(unittest.TestCase):
def test_light_profiles(self):
"""Test light profiles."""
platform = loader.get_component('light.test')
platform = loader.get_component(self.hass, 'light.test')
platform.init()
user_light_file = self.hass.config.path(light.LIGHT_PROFILES_FILE)