Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.79 KB

README.md

File metadata and controls

46 lines (31 loc) · 1.79 KB

pyTibber

Build Status Coverage Status PyPI version Code style: black License: MIT Language grade: Python

Python3 library for Tibber.

Read electricity price and consumption.

If you have a Tibber Pulse or Watty you can see your consumption in real time.

Buy me a coffee :)

Go to developer.tibber.com/ to get your API token.

Install

pip3 install pyTibber

Example:

import tibber
access_token = tibber.DEMO_TOKEN
tibber_connection = tibber.Tibber(access_token)
tibber_connection.sync_update_info()
print(tibber_connection.name)

home = tibber_connection.get_homes()[0]
home.sync_update_info()
print(home.address1)

home.sync_update_price_info()

print(home.current_price_info)

tibber_connection.sync_close_connection()

The library is used as part of Home Assitant: https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/tibber