Giter Site home page Giter Site logo

Comments (4)

dahlb avatar dahlb commented on May 28, 2024

I'm not sure why the api is saying your mileage is 0, but that is why the next service is being populated with an invalid value. As for the mileage according to the response you provided the server is saying as of yesterday your vehicle's mileage is 0

"mileage":"0","mileageSyncDate":"20211229212654"

I don't see anyway to fix this given the limitations of the US Kia api :(

from ha_kia_hyundai.

jakecolman avatar jakecolman commented on May 28, 2024

from ha_kia_hyundai.

dahlb avatar dahlb commented on May 28, 2024

I wonder if this is related to #47 I just updated from 4.x to the latest Kia Connect 5.1.0 and checked the traffic for my vehicle and it is still not doing any extra api calls for mileage. Sorry if there is another API call to map I can't find it with my available kia account.

from ha_kia_hyundai.

jaywryan avatar jaywryan commented on May 28, 2024

I have a similar issue. My mileage is showing correct, but my last service and next service do not calculate correctly. I have not reached my first service interval, and there is no logic to detect this.

My last service date shows 96,000 which makes sense according to the below code which just tacks on the odometer reading to the maintenance array and sorts it.

vehicle.last_service_value = maintenance_array[current_mileage_index - 1]

Perhaps a better approach would be to check where vehicle.odometer_value was in the array, and then if it's first, output "NA" or 0 or something.

Also, instead of next service value, I think it would be more meaningfull to show 'miles until next service'. In my raw data, this is already computed for my vehicle as nextServiceMile and would be fairly trivial to add.

Here is a snippet from my RAW data and what I would expect to see in HA

                    "nextServiceMile": 5980,
                    "maintenanceSchedule": [
                        2020.0,
                        8000,
                        16000,
                        24000,
                        32000,
                        40000,
                        48000,
                        56000,
                        64000,
                        72000,
                        80000,
                        88000,
                        96000
                    ]
                },```

Odometer: 2020
Last Service: NA
Next Service Interval: 8000
Miles until next service: 5980






from ha_kia_hyundai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.