Closed mm98 closed 6 months ago
When I look at how this was previously implemented. I understand why it is now returning Unavailable
. Since the JSON returned doesn't contain any float
value, but an boolean
value for OIL_LEVEL_DIPSTICKS_PERCENTAGE
. Meaning it had been wrong all the time.
Thanks for reporting @mm98 !
true
while others are showing True
. I wouldn't think that would be an issue, but we can adjust for that easily.I guess the new binary sensor is there? The old sensor you can delete safely.
I guess the new binary sensor is there? The old sensor you can delete safely.
Your right. I could use the binary_sensor.audi_a5_sportback_oil_level_binary
instead. Thanks.
I'll close this, since I can just use the binary sensor.
My sensor became unavailable but no other binary sensor is showing
I have the same problem as @arandax. Scratch that, I have the binary but the previous oil sensor was there, I just disabled it and all is well.
@arandax @xhemp please provide logs so we can investigate.
@coreywillwhat Just tossing my hat into the ring here too. The original oil level sensors became unavailable as described by the OP of this issue. I deleted it since Home Assistant said it wasn't being managed or something like that anymore. The replacement / newer binary_sensor mentioned as the solution to this issue does not exist / was not created The only oil related sensors I have now are the oil change distance and oil change time.
Other than the missing oil level sensors, everything else seems to be working fine (34 entities created by this integration with valid data)
I did enabled debug logging but didn't see any unusual errors. I do have 2x 403 ClientResponseErrors but those are for the trip data and climater which I'm pretty sure are not features supported by my 2019 B9 Audi (US).
The only oil level related log lines I found are the following:
2024-04-29 01:56:46.309 DEBUG (MainThread) [custom_components.audiconnect.audi_models] TRY APPEND FIELD: Searching for 'OIL_LEVEL_DIPSTICKS_PERCENTAGE' at location=['oilLevel', 'oilLevelStatus', 'value', 'value']
2024-04-29 01:56:46.309 DEBUG (MainThread) [custom_components.audiconnect.audi_models] TRY APPEND FIELD: Value for 'OIL_LEVEL_DIPSTICKS_PERCENTAGE' is None or missing; not appending field.
Here is the DEBUG log line for "Vehicle data returned for VIN":
2024-04-29 01:56:46.308 DEBUG (MainThread) [custom_components.audiconnect.audi_services] Vehicle data returned for VIN: *************XXXX: {'access': {'accessStatus': {'value': {'overallStatus': 'safe', 'carCapturedTimestamp': datetime.datetime(2024, 4, 27, 23, 56, 22, tzinfo=datetime.timezone.utc), 'doors': [{'name': 'bonnet', 'status': ['closed']}, {'name': 'frontLeft', 'status': ['locked', 'closed']}, {'name': 'frontRight', 'status': ['locked', 'closed']}, {'name': 'rearLeft', 'status': ['locked', 'closed']}, {'name': 'rearRight', 'status': ['locked', 'closed']}, {'name': 'trunk', 'status': ['locked', 'closed']}], 'windows': [{'name': 'frontLeft', 'status': ['closed']}, {'name': 'frontRight', 'status': ['closed']}, {'name': 'rearLeft', 'status': ['closed']}, {'name': 'rearRight', 'status': ['closed']}, {'name': 'roofCover', 'status': ['unsupported']}, {'name': 'sunRoof', 'status': ['closed']}], 'doorLockStatus': 'locked'}}}, 'fuelStatus': {'rangeStatus': {'value': {'carCapturedTimestamp': datetime.datetime(2024, 4, 27, 23, 56, 22, tzinfo=datetime.timezone.utc), 'carType': 'gasoline', 'primaryEngine': {'type': 'gasoline', 'currentSOC_pct': 100, 'remainingRange_km': 667, 'currentFuelLevel_pct': 100}, 'totalRange_km': 667}}}, 'measurements': {'rangeStatus': {'value': {'carCapturedTimestamp': datetime.datetime(2024, 4, 27, 23, 56, 22, tzinfo=datetime.timezone.utc), 'gasolineRange': 667, 'totalRange_km': 667}}, 'odometerStatus': {'value': {'carCapturedTimestamp': datetime.datetime(2024, 4, 27, 23, 56, 22, tzinfo=datetime.timezone.utc), 'odometer': 35153}}, 'fuelLevelStatus': {'value': {'carCapturedTimestamp': datetime.datetime(2024, 4, 27, 23, 56, 22, tzinfo=datetime.timezone.utc), 'currentFuelLevel_pct': 100, 'primaryEngineType': 'gasoline', 'carType': 'gasoline'}}}, 'vehicleLights': {'lightsStatus': {'value': {'carCapturedTimestamp': datetime.datetime(2024, 4, 27, 23, 56, 22, tzinfo=datetime.timezone.utc), 'lights': [{'name': 'right', 'status': 'off'}, {'name': 'left', 'status': 'off'}]}}}, 'vehicleHealthInspection': {'maintenanceStatus': {'value': {'carCapturedTimestamp': datetime.datetime(2024, 4, 27, 23, 56, 12, tzinfo=datetime.timezone.utc), 'inspectionDue_days': 384, 'inspectionDue_km': 25589, 'mileage_km': 35153, 'oilServiceDue_days': 19, 'oilServiceDue_km': 9495}}}}
I hope the above is helpful.
-Gary
The only oil level related log lines I found are the following:
That is actualy a bit strange, that there can be such a big different between the Audi response data (EV vs gasoline maybe). I just checked my logs and found this. The sensor is working by me.
Audi API response:
'oilLevel': {'oilLevelStatus': {'value': {'carCapturedTimestamp': datetime.datetime(2024, 4, 28, 13, 12, 43, tzinfo=datetime.timezone.utc), 'value': True}}}
Audi Connect parsing:
TRY APPEND FIELD: Searching for 'OIL_LEVEL_DIPSTICKS_PERCENTAGE' at location=['oilLevel', 'oilLevelStatus', 'value', 'value']
TRY APPEND FIELD: Found 'OIL_LEVEL_DIPSTICKS_PERCENTAGE' with value=True, loc=['oilLevel', 'oilLevelStatus', 'value', 'carCapturedTimestamp'], ts=2024-04-28 13:12:43+00:00
Located with OIL_LEVEL_DIPSTICKS_PERCENTAGE=true
. So what would a true
value define - that there would be more information available somewhere (the first api response doesn't contain any) ?
On a side note, I just loaded up the MyAudi App (Android) and it also no longer shows me the oil level or even simple status (e.g: Oil Level: OK) in there. I see fuel level but no oil level unless they hid it somewhere that I have not found yet.
So, maybe for me, not having an oil level status is an Audi issue (or "feature") for my car and not a problem with the integration?
I did find an Audi World forum post of others talking about the MyAudi app no longer reporting oil level / status from 2022. It sounds like for the B9 the accuracy of the oil level reported in the MyAudi app was hit or miss. Originally the MyAudi app would report oil level as a % then they changed it to a simple status (OK / Low I guess) and now it's just gone.
https://www.audiworld.com/forums/a4-b9-platform-discussion-212/app-cant-check-oil-3037827/
Thanks for providing logs and your investigation @heymoe ! I can confirm the Audi API is no longer reporting the oil level, neither percentage nor binary, for your vehicle based on the log data you provided. Sorry for your loss :(
No problem. Thanks for confirming Audi removing the feature for my car and for keeping this integration working in general.
Describe the bug
Thanks for all the work you guys do. Much appreciated! This isn't really a big problem for me. I just wanted to report it.
Suddenly (after upgrading to 1.6) my
Oil level
becameUnavailable
. It had previously returned100%
. The variableOIL_LEVEL_DIPSTICKS_PERCENTAGE
(value: true) is present in the debug logs.To Reproduce None.
Expected behavior Showing some kind of value.
Screenshots
Logfile home-assistant_audiconnect_2024-04-16T12-55-52.255Z.log