1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Remove loader.get_component (#23111)

* Remove get_component

* Lint
This commit is contained in:
Paulus Schoutsen
2019-04-14 22:31:01 -07:00
committed by Jason Hu
parent 23cb579f9f
commit b0d893afc9
11 changed files with 69 additions and 84 deletions

View File

@@ -18,7 +18,6 @@ from homeassistant.const import (
TEMP_FAHRENHEIT,
ATTR_TEMPERATURE
)
from homeassistant import loader
from homeassistant.util.unit_system import METRIC_SYSTEM
from homeassistant.components import input_boolean, switch
from homeassistant.components.climate.const import (
@@ -98,7 +97,7 @@ async def test_heater_input_boolean(hass, setup_comp_1):
async def test_heater_switch(hass, setup_comp_1):
"""Test heater switching test switch."""
platform = loader.get_component(hass, 'test.switch')
platform = getattr(hass.components, 'test.switch')
platform.init()
switch_1 = platform.DEVICES[1]
assert await async_setup_component(hass, switch.DOMAIN, {'switch': {