Skip to content

Home Assistant custom integration for NBP - Narodowy Bank Polski

License

Notifications You must be signed in to change notification settings

korasinski/ha-nbp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maintained maintainer release hacs_badge buymeacaffe

Custom component for NBP - Narodowy Bank Polski

A sensor which allows you to collect currency rates from Narodowy Bank Polski using HTTP API and sensor entity.

Supported currencies

Support for all currencies from NBP table C:

Currency code Currency name
AUD Australian Dollar
CAD Canadian Dollar
CHF Swiss Franc
CZK Czech Koruna
DKK Danish Krone
EUR Euro
GBP British Pound Sterling
HUF Hungarian Forint
JPY Japanese Yen
NOK Norwegian Krone
SEK Swedish Krona
USD United States Dollar
XDR SDR (MFW)

Features

  • Bid price
  • Ask price
  • Currency code
  • Currency name (in Polish)
  • Table number
  • Table effective date
  • Table trading date
  • UI configuration setup

Screenshots

Component can be used with default sensor card:

NBP entities in default sensor card

and Mini Graph Card from kalkih:

NBP entities in mini-graph-card

Instalation

Manual installation

  • Put the files from /custom_components/nbp/ in your HA config folder under <config directory>/custom_components/nbp/
  • Restart Home Assistant
  • Configure new integration in configuration.yaml, see details below
  • Restart Home Assistant again
  • Add nbp_* entity (or entities) to the UI
  • Reload UI and use new integration :)

Installation via HACS

  • Copy repository URL: https://github.com/korasinski/ha-nbp to Custom repositories in HACS
  • Click Add button and browse the repository list to install newest relase
  • Integration will be loaded after restart of Home Assistant
  • Configure new integration in configuration.yaml, see details below
  • Restart Home Assistant again and configure nbp_* entity (or entities) on your UI

Configuration

Minimum configuration.yaml:

- platform: nbp
  currency:
    - code: USD
    - code: EUR

Full configuration.yaml:

- platform: nbp
  scan_interval: 00:60:00
  currency:
    - code: USD
      name: USD to PLN
    - code: EUR
      name: EUR to PLN

Configuration variables:

key description
platform (Required) The platform name nbp
scan_interval (Optional) A time peroid (hh:mm:ss) how often the integration shold pull new data from NBP, default is 60 minutes
currency (Required) List of currencies for which sensor entities will be created
code (Required) Currency code (see supported currencies) in UPPERCASE
name (Optional) Name of the entity, default will be picked from code

All trademarks and registered trademarks presented in the pictures above are property of their respective owners.