Closed synack666 closed 7 months ago
File "/config/custom_components/audiconnect/audi_connect_account.py", line 839, in oil_level if isinstance(val, bool): ^^^ UnboundLocalError: cannot access local variable 'val' where it is not associated with a value
Can you deliver a debug file?
sure, how long should i run debug? reload audi_connect? my comment abouve is from debug file
Yes should be enough but if you already filled up oil maybe it doesn't make sense. I would need the data before filling up oil to see why it showed up 100% instead of empty.
Just a comment here -- since I bought the car in December (2019 Q5) the oil sensor has randomly moved 100% <-> 75% <-> 0%. This was before the API changes, but it never seemed to be giving good information (in the car, there is never a problem).
Now the API is different, but maybe this never worked properly?
Yes should be enough but if you already filled up oil maybe it doesn't make sense. I would need the data before filling up oil to see why it showed up 100% instead of empty.
have filled up... but gues not to 100%, i run a debug
Just a comment here -- since I bought the car in December (2019 Q5) the oil sensor has randomly moved 100% <-> 75% <-> 0%. This was before the API changes, but it never seemed to be giving good information (in the car, there is never a problem).
Now the API is different, but maybe this never worked properly?
it was always just a rough estimate but I could see it slowly getting less and less
From your log:
File "/config/custom_components/audiconnect/audi_connect_account.py", line 839, in oil_level if isinstance(val, bool): ^^^ UnboundLocalError: cannot access local variable 'val' where it is not associated with a value
Can you provide again a log file with switching on debugging level for this integration?
2024-04-02 155736.440 DEBUG (MainTh.txt
yes of course, hope that fits
Thanks, I think I got the issue and already included the fix with a PR.
Please try with version 1.1.0: https://github.com/audiconnect/audi_connect_ha/releases/tag/v1.1.0
Unfortunately I have to tell you that it is apparently not solved, in HA 100%, in the car roughly 70% (I only have a bar display and have to estimate).
Sadly your log /api provides currently only True as oil_level:
OIL_LEVEL_DIPSTICKS_PERCENTAGE loc:['oilLevel', 'oilLevelStatus', 'value', 'carCapturedTimestamp']: val:True
That's why you see 100% in HA.
ok, thnx, hoping Audi fix ist.... sometimes...
My Audi App told me to check my oil level, my car needed some. In HA the oil level was 100% all the time. Car: S4 TFSI