How do I use id 0?
I have about 15 stocks but 3 of them were not available on Avanza so I used id=0 for them. Is there any way to update the stock price using a different entity? I was able to add the stock price to a Yahoo Finance Integration entity but that integration doesn't track number of shares and purchase price so it doesn't do all the cool calculations like you integration does.
You use it like this
- id: 0
name: off market stock
shares: 100
purchase_price: 100
currency: SEK
So the purchase price is also the current price. Currently that is expectee to be just a number but it is definetly doable to have it reference another entity. I just update the purchase price every year when there is a new evaluation, this was my usecase for implementing the feature.
What stock is it that you cant find on avanza?
Hi, thanks for messaging back! The three stocks I can't find are EQL, DHS, & BRCHF.
I was able to add entities for those stocks using the Yahoo Finance HACS Integration so I was hoping there was a way to override the stock price with that entity.
For example if the stock price entity for EQL from the Yahoo Finance Integration is sensor.yahoofinance_eql then
- id: 0
name: EQL
shares: 100
purchase_price: 100
stock_price: sensor.yahoofinance_eql
I'm not a developer so I'm not sure if that's possible. The reason why I wanted to do this is because your integration does all the fancy work of calculating total value based on purchase price and quantity of shares. The Yahoo Finance Integration seems to just get stock prices.