Closed mm98 closed 11 months ago
I do not get these two errors myself, but I can see how it can lead to such loggings if the read values are null. I have now added some more error handling. Try the version in the main branch (not in a release yet).
Mileage since refuel: It now checks for odometer_current being null / None, and if so does not do the calculation. Instead the sensor should show as unavailable, until the odometer reports a value again.
Location: It only updates location when ignition is on, or last ignition timestamp has changed. This is to avoid triggering automations due to GPS inaccuracy. If the ignition timestamp is not reported or is invalid, it will now just update the location even when ignition is off.
From #15 the rounding is now done by Home Assistant. Mine has started to report a value again, but if it ever reports null again, HA should just show it as unavailable.
Try the version in the main branch (not in a release yet).
Thanks! I'll give it a try and report back with any findings.
Hi. The changes in the main branch removed the errors. So I guess this can be closed?
Hi,
It looks like there still are some kind of bug(s) with the refueling event from ConnectedCars. Strangely it worked last time I refueled with the same version of the integration (v1.1.1).
https://github.com/jnxxx/homeassistant-connectedcars_io/blob/3f4f010a508cd308b10feeafa1cdf9a1371dc3ce/custom_components/connectedcars_io/sensor.py#L381-L387
https://github.com/jnxxx/homeassistant-connectedcars_io/blob/3f4f010a508cd308b10feeafa1cdf9a1371dc3ce/custom_components/connectedcars_io/device_tracker.py#L162-L172 Note:
audi_a5_fuel_economy
is disabled as suggested in #15.