Yannik25 / ha-ryd

Home-Assistant Custom Component to read data from ryd (formaly Tanktaler)
Apache License 2.0
9 stars 1 forks source link

Second adapter #6

Open voncaron opened 2 years ago

voncaron commented 2 years ago

Hi,

thx for your work. I have two of those adapters. The plug-in returns only the values for the first car. Any possibility to integration more then one car?

thx Jo

Yannik25 commented 2 years ago

Hi Jo,

please install https://github.com/Yannik25/pyryd locally and try running the example code (example.py) the api_url is https://tt4.thinxcloud.de/ , your email and password and post the result here (anonymized, you car plate might be in that data). I will check the returned data and can adjust the code.

thanks

voncaron commented 2 years ago

result.txt

voncaron commented 2 years ago

Test Script is only returning one car - the first one

Yannik25 commented 2 years ago

Hi Jo,

can you try changing line 102 of pyryd/pyryd/pyryd.py from: rydid = json_object["things"][0]["id"] to rydid = json_object["things"][1]["id"] does this show the values of your second car?

Thanks

voncaron commented 2 years ago

Hi Yannik,

yes I can confirm that this change will display the second adapter informations.

thx Jo

voncaron commented 2 years ago

Hi Yannik,

any update on this topic? Or did I miss anything.

Jo

Yannik25 commented 1 year ago

Sadly, I don't have the time to work on it currently. It should be possible to fork this repo and add it as a second custom component with the change needed.