daernsinstantfortress / cupra_we_connect

Cupra integration for Home Assistant
Apache License 2.0
54 stars 7 forks source link

When target state of charge set via My Cupra app, it takes effect in the car but the change is not reflected in HA #75

Open ChrisJ60 opened 3 months ago

ChrisJ60 commented 3 months ago

If I change the target state of charge (say from 90% to 80%) in the My Cupra app (in the active routine, since car is parked at home) then the change propagates successfully to the car. However the sensor (and associated number slider) in the HA integration does not change to reflect the new value. Other things are refreshing from Cupra Connect to HA so I am wondering if there is a bug affecting this specific item? I even tried reloading the integration but it still does not pick up the new value.

daernsinstantfortress commented 3 months ago

Will take a look next week 👍

Yorkie71 commented 3 months ago

I confirm this behaviour too although I never use it as I always charge immediately and never used routines since moving to IOG. I'll have to test over the weekend but I wonder if the HA sensor is reflecting the live setting rather than what would be set in a routine. Oddly, since the app update, I can't set the SoC in the immediate charge option on the app when it's unplugged.

ChrisJ60 commented 3 months ago

I confirm this behaviour too although I never use it as I always charge immediately and never used routines since moving to IOG. I'll have to test over the weekend but I wonder if the HA sensor is reflecting the live setting rather than what would be set in a routine. Oddly, since the app update, I can't set the SoC in the immediate charge option on the app when it's unplugged.

Yes, the notion of there being a general set of charging settings and then specific settings per routine certainly causes some confusion and issues, including for the actual My Cupra app itself (same for the corresponding VW app for the ID series). I too wondered if the HA integration is reporting the 'other' charging limit but since, as you note, it isn't possible now to view/set that when the car is at a routine location, I'm not sure. VAG sure made this a little more complicated than it needs to be... I too mostly charge using IOG but I do also set a target SOC in the car (for higher than the IOG setting) as a backstop in case IOG doesn't correctly stop the charge (to avoid accidentally charging to 100%).

Yorkie71 commented 3 months ago

I'm not sure. VAG sure made this a little more complicated than it needs to be...

100% they made it more complicated. It took me ages to get my head around the scheduled charging. It's a horrid process. I'm just glad I set it to 100% and let IOG do the rest. FWIW, IOG has never failed with the SoC setting and if it did, it's not a big deal as I generally would be driving it soon after.

Yorkie71 commented 3 months ago

Just tested my theory and it was correct. When plugged in the immediate charge SoC is visible. If I change on the app, it's reflected in HA and vice versa so it looks like it's the SoC in the schedule charging that is the issue.

ChrisJ60 commented 3 months ago

Just tested my theory and it was correct. When plugged in the immediate charge SoC is visible. If I change on the app, it's reflected in HA and vice versa so it looks like it's the SoC in the schedule charging that is the issue.

Good to know! Not sure how easy it will (or won't) be to cope with this in the HA integration code. The My Cupra app handles it quite differently, as we know.

ChrisJ60 commented 3 months ago

I just did another experiment and the same issue applies to the 'Reduce AC charging power' (Slow charge option in My Cupra app). The value displayed via the HA integration, and any changes made to it via the integration, apply to the 'manual' setting not the setting in the routine.

It seems to me that the HA integration needs to do things differently when 'carname_charging_settings' has the value 'profile' (a routine is in control) versus when it doesn't. As I'm not familiar with all of the ins and outs of the API I don't know how feasible that is.