diff options
author | Volker Hoffmann <volker@cheleb.net> | 2021-12-07 20:50:13 +0100 |
---|---|---|
committer | Volker Hoffmann <volker@cheleb.net> | 2021-12-07 20:50:13 +0100 |
commit | 25037507fa0077002abac5ee28fc5b370d443b80 (patch) | |
tree | 7cc90ced1c3316bfac0ed9c6e332786caf83572c /ticker_tibber.py | |
parent | 9c578e61857bef3f8f1cec520f7ff515c4bc2be8 (diff) |
Diffstat (limited to 'ticker_tibber.py')
-rw-r--r-- | ticker_tibber.py | 8 |
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) |