GithubHelp home page GithubHelp logo

Units not correct about mbapi2020 HOT 7 CLOSED

renenulschde avatar renenulschde commented on May 23, 2024
Units not correct

from mbapi2020.

Comments (7)

ReneNulschDE avatar ReneNulschDE commented on May 23, 2024

Hi, please share some more details:

  • what is your unit configuration in the MB IOS/android app
  • What is your unit configuration in HA
  • Please share the attributes of the odometer

from mbapi2020.

Tirzono avatar Tirzono commented on May 23, 2024

I encounter the same issue. To answer the questions:

  • What is your unit configuration in the MB IOS/android app

It's miles in the Android app

  • What is your unit configuration in HA

The unit system I use is metric (Celsius, kilogram). I can't find anything about km/miles anywhere in the settings.

  • Please share the attributes of the odometer

Is it also okay to only share the ones that I think should be relevant for this issue (to not expose to much information about my car)? Let me know if you need more information.

Original value 8514
Distance unit MILES
Unit MILES
DistanceReset 5286.7
DrivenTimeReset 9657

Note that for me it shows as 5,290 km in the interface, where it should be 5,290 miles.

from mbapi2020.

ReneNulschDE avatar ReneNulschDE commented on May 23, 2024

Hi, mi is shown when you switch to the imperial system in HA. Is this an option?

from mbapi2020.

Tirzono avatar Tirzono commented on May 23, 2024

I tried switching to the imperial system, but it would not show me miles (although I didn't restart my home assistant, not sure if that would be required for it to show). However, I live in the UK but I am from the EU, so I prefer the metric system. Switching to imperial would also mess up with other things such as Fahrenheit/Celcius.

Ideally I would like to see the miles, but I could live with km's as well. However, the km's are now showing wrong.

Happy to try to make a PR for it myself if you want to?

from mbapi2020.

ReneNulschDE avatar ReneNulschDE commented on May 23, 2024

Hi,

I have rewritten the Unit Handling of this component. With the current master branch, you can define your unit-settings in the MB-me app and these settings are used in the component in HA too.

Would be good if you could test this in your instance before I publish a new version.

All changes compared to the last version 0.7.4

BREAKING CHANGES:

Units:
- All units are based on the settings of the MB Me (Connect) App now.

Sensor SOC

  • added State Class measurement
  • removed attribute chargingpower (extra sensor now)

Sensor Odometer

  • removed attribute averageSpeedReset (extra sensor now)
  • removed attribute averageSpeedStart (extra sensor now)
  • removed attribute distanceReset (extra sensor now)
  • removed attribute distanceStart (extra sensor now)
  • removed attribute distanceZEReset (extra sensor now)
  • moved attribute drivenTimeZEReset to sensor distanceZEReset
  • moved attribute drivenTimeReset to sensor distanceReset
  • moved attribute drivenTimeZEReset to sensor distanceZEReset
  • removed attribute batteryState (extra sensor starterBatteryState now)
  • removed attribute ecoscoretotal (extra sensor ecoscoretotal now)
  • removed attribute ecoscorefreewhl (extra sensor ecoscorefreewhl now)
  • removed attribute ecoscorebonusrange (extra sensor ecoscorebonusrange now)
  • removed attribute ecoscoreconst (extra sensor ecoscoreconst now)
  • removed attribute ecoscoreaccel (extra sensor ecoscoreaccel now)
  • removed attribute ecoscorebonusrange (extra sensor ecoscorebonusrange now)
  • removed attribute liquidconsumptionstart (extra sensor liquidconsumptionstart now)
  • removed attribute liquidconsumptionreset (extra sensor liquidconsumptionreset now)
  • removed attribute rangeliquid (extra sensor rangeliquid now)
  • removed attribute tanklevelpercent (extra sensor tanklevelpercent exists already)

Sensor distanceZEReset

  • added attribute drivenTimeZEReset (from Odometer)

Sensor distanceStart

  • added attribute drivenTimeStart (from Odometer)

Sensor distanceReset

  • added attribute drivenTimeReset (from Odometer)

Sensor tanklevelpercent

    • added State Class measurement

from mbapi2020.

ReneNulschDE avatar ReneNulschDE commented on May 23, 2024

fixed with release v0.8.0b2

from mbapi2020.

Tirzono avatar Tirzono commented on May 23, 2024

I only see your message now. Thank you for fixing this. I just reinstalled the custom component and I can confirm it works!

from mbapi2020.

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.