mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
remove config sections from hass.config.components (#22370)
* remove config sections from hass.config.components * fix tests
This commit is contained in:
parent
42c27e5b72
commit
0c4380a78d
@ -46,7 +46,6 @@ async def async_setup(hass, config):
|
|||||||
if success:
|
if success:
|
||||||
key = '{}.{}'.format(DOMAIN, panel_name)
|
key = '{}.{}'.format(DOMAIN, panel_name)
|
||||||
hass.bus.async_fire(EVENT_COMPONENT_LOADED, {ATTR_COMPONENT: key})
|
hass.bus.async_fire(EVENT_COMPONENT_LOADED, {ATTR_COMPONENT: key})
|
||||||
hass.config.components.add(key)
|
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def component_loaded(event):
|
def component_loaded(event):
|
||||||
|
@ -29,7 +29,6 @@ def test_load_on_demand_already_loaded(hass, aiohttp_client):
|
|||||||
yield from async_setup_component(hass, 'config', {})
|
yield from async_setup_component(hass, 'config', {})
|
||||||
|
|
||||||
yield from hass.async_block_till_done()
|
yield from hass.async_block_till_done()
|
||||||
assert 'config.zwave' in hass.config.components
|
|
||||||
assert stp.called
|
assert stp.called
|
||||||
|
|
||||||
|
|
||||||
@ -47,5 +46,4 @@ def test_load_on_demand_on_load(hass, aiohttp_client):
|
|||||||
hass.bus.async_fire(EVENT_COMPONENT_LOADED, {ATTR_COMPONENT: 'zwave'})
|
hass.bus.async_fire(EVENT_COMPONENT_LOADED, {ATTR_COMPONENT: 'zwave'})
|
||||||
yield from hass.async_block_till_done()
|
yield from hass.async_block_till_done()
|
||||||
|
|
||||||
assert 'config.zwave' in hass.config.components
|
|
||||||
assert stp.called
|
assert stp.called
|
||||||
|
Loading…
x
Reference in New Issue
Block a user