custom-components / sensor.avanza_stock

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

How do I use this custom component? #103

Closed capttrousers closed 3 years ago

capttrousers commented 3 years ago

Hello, I found this stock tracker from this thread: https://community.home-assistant.io/t/custom-component-avanza-stock/104648/89

I've followed the readme for installation via HACS, but I dont know what to do from here.

Where do I put the config file that the readme has examples of?

How can I grab the stock id's off the Avanza website? I dont speak swedish and cant see how to switch the language to english :p

How do I consume the stock data in the UI?

Thanks!

capttrousers commented 3 years ago

I ended up following this blog post from that thread: https://blog.kevineifinger.de/archive/2019/10/17/Using-Homeassistant-As-My-Self-Hosted-Stock-Alert.html

The config examples go directly in the configuration.yaml file at the root of the HA config directory.

Searching the Avanza website wasn't that difficult if you just use the Search (Sok in swedish) bar on the right, and searched various US stocks/ETFs.

The blog post also has a pretty simple usage of the mini-graph-card custom card you can get on HACS via the Frontend install UI. The config that I entered in the yaml editor for a custom card is below:

type: 'custom:mini-graph-card'
entities:
  - sensor.<avanza stock name attr>
graph: line
hour24: true
hours_to_show: 720
name: <Stock name> Stock last Month
show:
  extrema: true
  icon: true
  name: true
animate: true