Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wsdt/sensor.cryptoportfolio
Integration for Home-Assistant [Hassio] to load and accumulate your crypto portfolio from a variety of blockchains such as BTC, ETH, BSC, ..
https://github.com/wsdt/sensor.cryptoportfolio
crypto home-assistant home-assistant-integration lovelace lovelace-ui
Last synced: 6 days ago
JSON representation
Integration for Home-Assistant [Hassio] to load and accumulate your crypto portfolio from a variety of blockchains such as BTC, ETH, BSC, ..
- Host: GitHub
- URL: https://github.com/wsdt/sensor.cryptoportfolio
- Owner: wsdt
- License: mit
- Created: 2021-07-31T09:02:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-25T17:58:32.000Z (over 1 year ago)
- Last Synced: 2024-05-01T19:55:10.339Z (7 months ago)
- Topics: crypto, home-assistant, home-assistant-integration, lovelace, lovelace-ui
- Language: Python
- Homepage: https://wavect.io
- Size: 29.3 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Crypto Portfolio for Home-Assistant [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://bitbucket.org/lbesson/ansi-colors) [![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![GitHub license](https://img.shields.io/github/license/wsdt/sensor.cryptoportfolio.svg)](https://github.com/wsdt/sensor.cryptoportfolio/blob/master/LICENSE) [![Donate](https://img.shields.io/badge/Donate-Pay%20me%20a%20coffee-3cf)](https://github.com/wsdt/Global/wiki/Donation) [![saythanks](https://img.shields.io/badge/say-thanks-ff69b4.svg)](https://saythanks.io/to/kevin.riedl.privat%40gmail.com)
Install this Hassio integration via HACS.## Setup
![image](https://user-images.githubusercontent.com/28724551/221372378-69f81147-f60a-43df-80ba-db24ab2a0c7a.png)thanks to @mannebk79
## Params
Add this to your `configuration.yaml`.### Configuration for Ethereum or Ethereum forks such as Binance Smart Chain, ..
- address __required__
- name
- token
- token_address (if not provided, then main coin is used, e.g. ETH, BNB)
- explorer_api_key
- main_coin (default: `ETH`)
- explorer_api_url (default: `https://api.etherscan.io/api`)
- decimals (default: `18`)
- blockchain (default: `ETH_OR_FORK`)---
### Configuration for BTC.
- address __required__
- name
- blockchain: "BTC"
(rest of the parameters is ignored)---
## Examples
```
sensor:
- platform: cryptoportfolio
address: "...."
token_address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
token: "USDC"
decimals: 6
explorer_api_key: "...."
- platform: cryptoportfolio
address: "...."
explorer_api_key: "...."
- platform: cryptoportfolio
address: "...."
blockchain: "BTC"
```---
## Sum up balances from different wallets
```
- platform: template
sensors:
eth_total:
friendly_name: "ETH (total)"
unit_of_measurement: 'ETH'
value_template: "{{ states('sensor.Anon_ETH') |float + states('sensor.HW_ETH') | float }}"
usdc_total:
friendly_name: "USDC/T (total, incl. staked)"
unit_of_measurement: 'USDC/T'
value_template: "{{ states('sensor.USDC') |float + states('sensor.HW_USDC') | float + states('sensor.HW_staked_USDC') | float + states('sensor.HW_staked_USDT') | float}}"```