@pytest.fixture
def mock_publish(hass):
    'Initialize components.'
    (yield hass.loop.run_until_complete(async_mock_mqtt_component(hass)))
Initialize components.
@pytest.fixture
def mock_publish(hass):
    
    (yield hass.loop.run_until_complete(async_mock_mqtt_component(hass)))