@alheimsins/tibber-get-price-info

1.1.1 • Public • Published

js-standard-style

tibber-get-price-info

Retrieve price info from tibber for your current subscription.

Usage

You'll need an access token from Tibber

import getPriceInfo from '@alheimsins/tibber-get-price-info'
const token = 'your-access-token'

console.log(await getPriceInfo(token)) //=> [{"total": 2.563, "energy": 2.0424, "tax": 0.5206,"startsAt": "2022-05-07T00:00:00.000+02:00"}]

If you have multiple homes, you can use the homeId option to specify which home to use. If you don't specify a homeId, the first home will be used.

import getPriceInfo from '@alheimsins/tibber-get-price-info'
const token = 'your-access-token'
const homeId = 'your-home-id-for-selected-home'

console.log(getPriceInfo(token, homeId)) //=> [{"total": 2.563, "energy": 2.0424, "tax": 0.5206,"startsAt": "2022-05-07T00:00:00.000+02:00"}]

Related

License

MIT

About

Created with for Alheimsins

Readme

Keywords

none

Package Sidebar

Install

npm i @alheimsins/tibber-get-price-info

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

4.92 kB

Total Files

4

Last publish

Collaborators

  • zrrrzzt
  • maccyber