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 2018-05-01 14:57:30 -04:00 committed by Pascal Vizeli
parent 5d96751168
commit 83d300fd11
50 changed files with 315 additions and 392 deletions

View file

@ -116,7 +116,7 @@ class TestGenericThermostatHeaterSwitching(unittest.TestCase):
def test_heater_switch(self):
"""Test heater switching test switch."""
platform = loader.get_component('switch.test')
platform = loader.get_component(self.hass, 'switch.test')
platform.init()
self.switch_1 = platform.DEVICES[1]
assert setup_component(self.hass, switch.DOMAIN, {'switch': {