-
Can you give an example how the current price can be queried? |
Beta Was this translation helpful? Give feedback.
Answered by
BeatsuDev
Dec 30, 2022
Replies: 1 comment
-
Hi! Thanks for creating a discussion. I think this should do the trick: import tibber
account = tibber.Account("<tibber token>")
home = account.homes[0] # Choose a home
subscription = home.subscriptions[0] # Choose a subscription
price = subscription.price_info.current The price variable is of type print(price.total)
print(price.tax)
print(price.energy)
print(price.currency) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BeatsuDev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Thanks for creating a discussion. I think this should do the trick:
The price variable is of type
Price
, so you can get the total price, tax, energy price without tax etc. like this: