async def test_abort_if_no_implementation_registered(hass):
    """Test we abort if no implementation is registered."""
    flow = config_flow.AmbiclimateFlowHandler()
    flow.hass = hass

    result = await flow.async_step_user()
    assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
    assert result["reason"] == "no_config"
Ejemplo n.º 2
0
async def init_config_flow(hass):
    """Init a configuration flow."""
    await async_setup_component(
        hass, "http", {"http": {"base_url": "https://hass.com"}}
    )

    config_flow.register_flow_implementation(hass, "id", "secret")
    flow = config_flow.AmbiclimateFlowHandler()

    flow.hass = hass
    return flow
Ejemplo n.º 3
0
async def init_config_flow(hass):
    """Init a configuration flow."""
    await async_setup_component(hass, 'http',
                                {'http': {
                                    'base_url': 'https://hass.com'
                                }})

    config_flow.register_flow_implementation(hass, 'id', 'secret')
    flow = config_flow.AmbiclimateFlowHandler()

    flow.hass = hass
    return flow
Ejemplo n.º 4
0
async def init_config_flow(hass):
    """Init a configuration flow."""
    await async_process_ha_core_config(
        hass,
        {"external_url": "https://example.com"},
    )
    await async_setup_component(hass, "http", {})

    config_flow.register_flow_implementation(hass, "id", "secret")
    flow = config_flow.AmbiclimateFlowHandler()

    flow.hass = hass
    return flow