flobz / psa_car_controller

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

CarModel' object has no attribute 'max_elec_consumption' #920

Open Piwek80 opened 3 months ago

Piwek80 commented 3 months ago

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

dbdavid44 commented 2 months ago

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

bollee23 commented 1 week ago

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