Skip to content

Releases: BeatsuDev/tibber.py

v0.5.0

06 Jan 21:02
66e7154
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.4.0...v0.5.0

v0.4.0

20 Jan 12:50
Compare
Choose a tag to compare

Changelog v0.4.0 🎉

  • Asynchronous callback functions. Functions should now be defined with the async def syntax!

Dev changes:

  • Code now follows black and flake8 format and uses isort to sort imports.
  • Pytests now use a session-scoped fixture "account" to avoid spamming the Tibber API by creating this fixture for each test individually. (This improved test speeds significantly too!)

How to define callbacks now:

import tibber

account = tibber.Account(<your token>)
home = account.homes[0]

@home.event("live_measurement")
async def callback(data):
    print(data.power)

home.start_live_feed()

v0.3.0

05 Jan 23:00
Compare
Choose a tag to compare

Changelog v0.3.0 🎉

  • A lot of improvements to the realtime data websocket connection! The bug where "Connection limit reached: 2" occurs should be improved (should occur less frequently. I'm still needing to monitor and work on this).
  • start_live_feed() now checks if realtime consumption is enabled before connecting to the websocket.
  • Added the tibber.Account.update() method: An alias for fetch_all()
  • Much better logging for websocket information
  • QueryExecutor now uses a permanent session instead of creating a whole new session for each request.

Enable logging:

import logging

logging.basicConfig()
logger = logging.getLogger("tibber")
logger.setLevel(logging.DEBUG)

import tibber

<your code here>

v0.2.1

01 Dec 13:07
Compare
Choose a tag to compare

Added exit conditions

home.start_live_feed(exit_condition = lambda data: data.power > 1000)

Fixed bug where stopping a live feed, then starting it again resulted in duplicate callback function calls.
Other general improvements and fixes!

v0.2.0

29 Nov 04:16
Compare
Choose a tag to compare

Changelog v0.2.0 🎉

  • Realtime information is now retrieved differently, using the graphql-transport-ws subprotocol (see issue #16) and using the third-party modules gql (and gql[websockets]) and graphql-core.

  • BREAKING: A tiny breaking change to the home object too: home.start_livefeed() has now been renamed to home.start_live_feed().

v0.1.1

28 Sep 11:45
Compare
Choose a tag to compare

Updated demo token.

v0.1.0

01 Aug 14:57
Compare
Choose a tag to compare

Changelog v0.1.0 🎉

v0.0.4

25 May 13:21
Compare
Choose a tag to compare

Initial live measurement release.

Edit: This version has a critical bug that does not allow it to work. See issue #8

v0.0.3-pre

11 May 23:32
Compare
Choose a tag to compare
v0.0.3-pre Pre-release
Pre-release

Finished all queries that are not live subscriptions or mutations.

Changelog v0.0.3

  • Added QueryBuilder.create_query(*args) method for creating specific queries.
  • Created many more types.

v0.0.2-pre

08 May 22:47
Compare
Choose a tag to compare
v0.0.2-pre Pre-release
Pre-release

This is still an early pre-release and this project is still a work-in-progress.

Changelog v0.0.2-pre

  • A clearer project goal has been specified (The goal is to develop a wrapper that is as close to the Tibber API format as possible).
  • More types have been added
  • The QueryBuilder has been refactored