custom-components / sensor.avanza_stock

Custom component to get stock data from Avanza for Home Assistant
MIT License
46 stars 10 forks source link

conversion_currency documentation #93

Closed pkissling closed 4 years ago

pkissling commented 4 years ago

Hi,

I'm trying to integrate Avanza with my Home Assistant installation. Since I'm from Germany, I'd like to calculate stocks to EUR. Going through the documentation I understand that one must use conversion_currency. The description says The index id used for currency conversion. Also see below how to find the id.. However, I do not find any documentation in the README.md file on how to obtain the corresponding ID.

Can you help me out?

Thanks, Patrick

claha commented 4 years ago

Yeah the documentation is lacking a bit, hopefully this now makes me prioritize it :)

If you search for "EUR/" you will hopefully find what you are looking. Click on it and check the url for the id. Example: https://www.avanza.se/index/om-indexet.html/18998/eur-sek

Note that for example there is no conversion available to convert sek to eur, only the other way around. Luckily there is an option "invert_conversion_currency: true" which handles this. I see now that this isn't documented either (or released as v1.0.5). If you use hacs you can select to install master if you need this feature. I will try to get that released and updated documentation ASAP.

pkissling commented 4 years ago

Cheers, problem solved. Thanks for the swift response!