Cryptocurrency | How To Track Your Crypto (and Stocks) in Home Assistant

In today’s video, I go over how to track your cryptocurrency or stock portfolio in Home Assistant. I kept getting tired of having to log into my Robinhood account over and over to check the volatile price changes of crpyto. So I decided to seek out a way to track my portfolio in Home Assistant.

So I show you how to set up a custom component that pulls data from Yahoo Finance. Then we look at creating a helper that will let you track the exact value of each of your stocks. Finally, I show you how to install a custom Lovelace card that gives you better graphing in Home Assistant.

Links to Custom Components / Lovelace Cards

Custom Configuration for Yahoo Finance

    - MSFT
    - GOOG
    - BTC-USD
    - DOGE-USD
    minutes: 30

Add to your configuration.yaml

Configuration Example for Template Sensor

- platform: template
      value_template: "{{ ((states.input_text.shares_doge.state|float) * (states.sensor.yahoofinance_doge_usd.state|float))|round(2) }}"
      unit_of_measurement: "$"
      friendly_name: "Value of DOGE Holdings"

Add to your sensors.yaml

states.input_text.shares_doge.state is the state of the input text helper that stores the number of shares of the stock you want to track

states.sensor.yahoofinance_doge_usd.state is the state of the sensor that is created by the Yahoo Finance custom component. This stores the price per share of the stock / crypto you want to track.