Closed sunkan85 closed 1 year ago
Same issue with all of my watched stocks. All show 0
Same issue like oli737, all of my stock sensors no longer receive informations.
I have the same issue. If you look in your logs, you should see something like [pyavanza] Response Error 404: Not Found
IMO, this is due to the python library used by the module, and the fact Avanza probably changed their API. Check the issue opened on the github for the library: https://github.com/claha/pyavanza/issues/52
Same here... just waiting for the code update!!! thanks in advance!
It looks like there's a fix waiting to be merged. https://github.com/claha/pyavanza/pull/53
Upgrading to v1.0.13 resolved this issue.
Although I get some readings again the monitored conditions arent working anymore for me. Below an example of my code and the data in HA.
- platform: avanza_stock
stock:
- id: 732295
name: stock_1
shares: 230
purchase_price: 8.62
- id: 732279
name: stock_2
shares: 11
purchase_price: 152.50
monitored_conditions:
- changePercent
- lastPrice
- lastPriceUpdated
state_class: measurement
changePercent: null
changePercentOneWeek: unknown
changePercentOneMonth: unknown
changePercentThreeMonths: unknown
changePercentSixMonths: unknown
changePercentOneYear: unknown
changePercentThreeYears: unknown
changePercentFiveYears: unknown
changePercentCurrentYear: unknown
lastPrice: null
lastPriceUpdated: null
shares: 230
totalValue: 2639.48
totalChange: 34.96
purchasePrice: 8.62
profitLoss: 2.86
profitLossPercentage: 33.13
totalProfitLoss: 656.88
unit_of_measurement: EUR
device_class: monetary
icon: mdi:cash
friendly_name: stock_1
Are you seeying the same @ghyde ?
@jghaanstra Yes, I am. The sensors' state is returning the current price, but change
, changePercent
, lastPrice
, and lastPriceUpdated
are all null
. So, my automations using those attributes are not working.
It is expected to not work since what the new api returns is completely different, see https://github.com/custom-components/sensor.avanza_stock/issues/145#issuecomment-1345297918
It is expected to not work since what the new api returns is completely different, see #145 (comment)
Roger that, thanx for the update.
Just released v1.1.0 that uses the new api. State and the change/changePercent attributes should at least work now :slight_smile:
Please let me know if you find issues!
Great job, thanks. No issues so far.
Stock: 155722 Oil index have shows 0. Been doing it for 3 days now but the other stocks are working.