Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend checking to handle None value in case of hybrid car #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucas2lab
Copy link

Testing the code with my Formentor Hybrid car I got a crash due to a None value returned on the chargePower_kW and chargeRate_kmph attributed returned as None.

I extend the code to fix it.

@neubi4
Copy link

neubi4 commented Aug 4, 2024

@daernsinstantfortress this should fix these issues with the home assistant integration:
daernsinstantfortress/cupra_we_connect/issues/46
daernsinstantfortress/cupra_we_connect/issues/54
daernsinstantfortress/cupra_we_connect/issues/76

This happens because i have an Cupra Born and an Cupra Leon e-hybrid in my MyCupra App. It seems that the hybrids report None for the two fields.
{'carCapturedTimestamp': '2024-08-04T12:25:52Z', 'chargingState': 'charging', 'chargeType': 'ac', 'chargeMode': 'manual', 'chargingSettings': None, 'remainingChargingTimeToComplete_min': 145, 'chargePower_kW': None, 'chargeRate_kmph': None, 'value': {...}}

@12retord
Copy link

12retord commented Oct 6, 2024

@neubi4 Hello, that means, it is possible to manage a Born and a second car (Hybrid) with this integration parallel? I have a Born and a Tarraco hybrid (which should be similar to the Formentor) and i‘m not able to get the integration started. As shown it is necessary so change to files. I tried, but it is not working for me. Maybe you can give me some hints/more Information. (Maybe parallel in german language) Thanks and best regards

@neubi4
Copy link

neubi4 commented Oct 7, 2024

@12retord you need the changes from this PR and also these changes https://github.com/daernsinstantfortress/cupra_we_connect/pull/78/files to get it working.

Du musst die Änderungen von diesem PR hier vornehmen und auch die von https://github.com/daernsinstantfortress/cupra_we_connect/pull/78/files damit das funktioniert. Ich hab das zuletzt aber im August getestet, ich weiß nicht ob das noch aktuell ist.

@12retord
Copy link

12retord commented Oct 7, 2024

The changes #78 are no problem.
My problem is, either i download the .zip file and make the changes above. But how can i install it with only the .zip file.
Or i install it via HACS, but where is the charging_status.py file saved to change it?

Die Änderungen in der sensor.py sind kein Problem, die Datei liegt ja im Verzeichnis: /custom_components/cupra_we_connect

Mit der charging_status.py komme ich nicht klar.
Wenn ich mir die zip Datei runterlade kann ich ja die entsprechende Datei editieren, aber wie bekomme ich die zip Datei dann in HA installiert.
Oder ich installiere das ganze über HACS, wo finde ich dann die Datei charging_status.py um diese zu editieren. Zgriff auf das Dateisystem über WinSCP ist vorhanden, nur finde ich das entsprechende Verzeichnis nicht.

Oder brauche ich einen komplett anderen Ansatz?

@MaHeymann
Copy link

I have the same problem with my Cupra Formentor. Is there a solution now?

@12retord
Copy link

12retord commented Oct 14, 2024

My solution is to use two Integrations, the Seat Connect for my Tarraco Hybrid in combination with the (old)Seat Connect App. And for the born i created a new user with a different Email. You are not able to controll anything in the my_cupra app, but you get all the things shown in HA. For controling your born with the my_cupra app you have to login again with the main-user-account
Not the best solution but it is working for me…

Copy link

@SmartHammer SmartHammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this with my Cupra Formentor Hybrid.
Worked well with the modification.

@MaHeymann
Copy link

MaHeymann commented Oct 14, 2024

How do I carry out the modifications? I'm a complete newbie at this. It would be nice if someone could help me with that. Also in German.

where can I find the file "weconnect_cupra/api/cupra/elements/charging_status.py"

@felix2702
Copy link

where can I find the file "weconnect_cupra/api/cupra/elements/charging_status.py"

The file is outside your home assistant config directory. This is the complete path:
/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/elements/charging_status.py

Cupra Leon ehybrid was imported successfully after making the changes above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants