(self, user_input=None)
return self.async_show_form(
            step_id="user", data_schema=DATA_SCHEMA, errors=errors
        )
Handle the initial step.
Handle the initial step.
Handle the initial step .
async def async_step_user(self, user_input=None):
        """Handle the initial step."""
        errors = {}
        if user_input is not None:
            try:
                info = await validate_input(self.hass, user_input)

                return self.async_create_entry(title=info["title"], data=user_input)
            except CannotConnect:
                errors["base"] = "cannot_connect"
            except InvalidAuth:
                errors["base"] = "invalid_auth"
            except Exception:  # pylint: disable=broad-except
                _LOGGER.exception("Unexpected exception")
                errors["base"] = "unknown"

        return self.async_show_form(
            step_id="user", data_schema=DATA_SCHEMA, errors=errors
        )
async def async_step_user ( self , user_input = None ) : errors = { } if user_input is not None : try : info = await validate_input ( self . hass , user_input ) return self . async_create_entry ( title = info [ "title" ] , data = user_input ) except CannotConnect : errors [ "base" ] = "cannot_connect" except InvalidAuth : errors [ "base" ] = "invalid_auth" except Exception : # pylint: disable=broad-except _LOGGER . exception ( "Unexpected exception" ) errors [ "base" ] = "unknown" return self . async_show_form ( step_id = "user" , data_schema = DATA_SCHEMA , errors = errors )