import warnings


def convert_el_slp_int_and_str(el_slp_int):
    """
    Converts el slp type integer into string

    Parameters
    ----------
    el_slp_int : int
        SLP type integer number

    Returns
    -------
    el_slp_tag : str
        SLP type string

    Annotations
    -----------
    #     0:  H0 : Residential
    #     1:  G0 : Commercial
    #     2:  G1 : Commercial Mo-Sa 08:00 to 18:00
    #     3:  G2 : Commercial, mainly evening hours
    #     4:  G3 : Commercial 24 hours
    #     5:  G4 : Shop / hairdresser
    #     6:  G5 : Backery
    #     7:  G6 : Commercial, weekend
    #     8:  L0 : Farm
    #     9:  L1 : Farm, mainly cattle and milk
    #     10:  L2 : Other farming
    """
    if el_slp_int is None:
        msg = 'el_slp_int is None. Going to return None.'
        warnings.warn(msg)
        return None

    slp_el_profile_dict_tag = {0: 'H0',
                               1: 'G0',
                               2: 'G1',
                               3: 'G2',
                               4: 'G3',
                               5: 'G4',
                               6: 'G5',
                               7: 'G6',
                               8: 'L0',
                               9: 'L1',
                               10: 'L2'}

    el_slp_tag = slp_el_profile_dict_tag[el_slp_int]
    return el_slp_tag