psa_car_controller icon indicating copy to clipboard operation
psa_car_controller copied to clipboard

CarModel' object has no attribute 'max_elec_consumption'

Open Piwek80 opened this issue 1 year ago • 2 comments

When I try to add my car (Peugeot 308 1.2.PT ) to HA I get this message: CarModel' object has no attribute 'max_elec_consumption'

2024-07-18 22:34:47,009 :: 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 28, in __init__ self.max_elec_consumption = max_elec_consumption or model.max_elec_consumption # kwh/100Km AttributeError: 'CarModel' object has no attribute 'max_elec_consumption' psa

Piwek80 avatar Jul 18 '24 20:07 Piwek80

Same issue here. I guess it only works with electric model. Mine is gas and I get this error too.

dbdavid44 avatar Aug 10 '24 13:08 dbdavid44

Same here, it wasn't obvious that PSACC was reserved to electric models, but it seems you're right (mine is also gas).

bollee23 avatar Oct 16 '24 20:10 bollee23