@pytest.fixture(autouse=True)
def setup_comp(hass):
    'Initialize components.'
    hass.loop.run_until_complete(async_setup_component(hass, fan.DOMAIN, {'fan': {'platform': 'demo'}}))
Initialize components.
@pytest.fixture(autouse=True)
def setup_comp(hass):
    
    hass.loop.run_until_complete(async_setup_component(hass, fan.DOMAIN, {'fan': {'platform': 'demo'}}))