def METHOD_NAME(bat_ip: str, bat_username: str, bat_password: str, num: int) -> float:
    bat_dev = BYDDevice(BYD(configuration=BYDConfiguration(user=bat_username,
                                                           password=bat_password,
                                                           ip_address=bat_ip)))
    bat_dev.add_component(BYDBatSetup(id=num))
    bat_power, _ = bat_dev.components["component"+str(num)].get_values()
    return bat_power