Huawei, the Chinese electronics giant, is gearing up to compete with its main rival, Xiaomi, in the electric vehicle sector.