def calc_dimless_el_en_flex(flex_energy, sh_dem,
                            dhw_dem):
    """
    Calculate dimensionless electric energy flexibility beta_el

    Parameters
    ----------
    building : object
        Building object of pyCity_calc
    array_flex_energy : float
        Energy flexibility in kWh
    sh_dem : float
        Space heating demand in kWh
    dhw_dem : float
        Hot water demand in kWh

    Returns
    -------
    beta_el : float
        Dimensionless electric energy flexibility
    """

    #  Calculate beta_el
    beta_el = flex_energy / ((sh_dem + dhw_dem) / 365)

    return beta_el