Changelog
- Adds the
fetch_price_info(resolution: Literal["HOURLY", "QUARTER_HOURLY"]) -> PriceInfo method on the Subscription object.
- Fixes wrong return type for
fetch_price_info_range (previously returned PriceInfo when it actually returns SubscriptionPriceConnection).
Fetch todays and tomorrows price:
import tibber
account = tibber.Account(tibber.DEMO_TOKEN)
subscription = account.homes[0].current_subscription
# QUARTER_HOURLY or HOURLY
price_info = subscription.fetch_price_info("QUARTER_HOURLY")
price_info.today # List of 96 Price objects
price_info.tomorrow # This data is populated once a day