flobz / psa_car_controller

Control psa car with connected_car v4 API.
GNU General Public License v3.0
383 stars 194 forks source link

ElecModel after Connection to PSA #848

Open MathiasWeisheit opened 2 months ago

MathiasWeisheit commented 2 months ago

After inserting the code of the oauth2redirect, I received this warning "'ElecModel' object has no attribute 'battery_power'"".

To Reproduce Steps to reproduce the behavior:

  1. Login
  2. Get Code from oauth2redirect
  3. Insert the "code" from oauth2redirect

Environment (please complete the following information):

Log

2024-04-11 08:50:26,480 :: ERROR :: finish_oauth: Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/view/config_oauth.py", line 56, in finish_oauth config_views.INITIAL_SETUP.connect(code) File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 114, in connect res = self.psacc.get_vehicles() File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 142, in get_vehicles self.vehicles_list.add(Car(vehicle.vin, vehicle.id, vehicle.brand, vehicle.label)) File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/model/car.py", line 26, in init self.battery_power = battery_power or model.battery_power AttributeError: 'ElecModel' object has no attribute 'battery_power'

MathiasWeisheit commented 2 months ago

Do you need more information?