acc cost filter
Some checks are pending
Docker Build and Push / build-and-push (push) Waiting to run
Some checks are pending
Docker Build and Push / build-and-push (push) Waiting to run
This commit is contained in:
parent
b13d3e6857
commit
336eefb963
2 changed files with 3 additions and 3 deletions
2
DataPoints.py
Normal file → Executable file
2
DataPoints.py
Normal file → Executable file
|
@ -14,7 +14,7 @@ class Pulse:
|
||||||
"power": float(power),
|
"power": float(power),
|
||||||
"lastMeterConsumption": float(lastMeterConsumption)
|
"lastMeterConsumption": float(lastMeterConsumption)
|
||||||
}
|
}
|
||||||
if cost is not None:
|
if cost is not None and float(cost) > 0:
|
||||||
fields.update({'accumulatedCost':cost})
|
fields.update({'accumulatedCost':cost})
|
||||||
self.datapoint = {"fields": fields,
|
self.datapoint = {"fields": fields,
|
||||||
"tags": tags,
|
"tags": tags,
|
||||||
|
|
4
pulse.py
4
pulse.py
|
@ -25,7 +25,7 @@ ch.setFormatter(formatter)
|
||||||
logger.addHandler(ch)
|
logger.addHandler(ch)
|
||||||
logger.setLevel(logging.INFO)
|
logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
__version__ = "v0.4.2"
|
__version__ = "v0.4.3"
|
||||||
logger.info(__version__)
|
logger.info(__version__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ def stop(home):
|
||||||
try:
|
try:
|
||||||
signal.signal(signal.SIGALRM, timeout_handler)
|
signal.signal(signal.SIGALRM, timeout_handler)
|
||||||
signal.alarm(15)
|
signal.alarm(15)
|
||||||
home.start_live_feed(user_agent="pulse.py/0.4.2",exit_condition=stop(home),retries=4,retry_interval=5.0)
|
home.start_live_feed(user_agent="pulse.py/0.4.3",exit_condition=stop(home),retries=4,retry_interval=5.0)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
logger.exception("Timeout occurred while executing start_live_feed()")
|
logger.exception("Timeout occurred while executing start_live_feed()")
|
||||||
client.close()
|
client.close()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue