aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2021-12-07 20:50:13 +0100
committerVolker Hoffmann <volker@cheleb.net>2021-12-07 20:50:13 +0100
commit25037507fa0077002abac5ee28fc5b370d443b80 (patch)
tree7cc90ced1c3316bfac0ed9c6e332786caf83572c
parent9c578e61857bef3f8f1cec520f7ff515c4bc2be8 (diff)
feat(tibber): accumulated consumption and costHEADmaster
-rw-r--r--ticker_tibber.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ticker_tibber.py b/ticker_tibber.py
index 166a1e1..e56d83b 100644
--- a/ticker_tibber.py
+++ b/ticker_tibber.py
@@ -30,6 +30,14 @@ async def _callback(pkg):
# collect some data
epoch = int(time.time())
lines = []
+ # accumulated consumption
+ line = "pulse_accumulatedConsumption value=%.2f %i" % \
+ (measurements['accumulatedConsumption'], epoch)
+ lines.append(line)
+ # accumulated cost
+ line = "pulse_accumulatedCost value=%.2f %i" % \
+ (measurements['accumulatedCost'], epoch)
+ lines.append(line)
# power
line = "pulse_power value=%ii %i" % (measurements['power'], epoch)
lines.append(line)