Skip to content

Commit

Permalink
Fixed Performance-Data
Browse files Browse the repository at this point in the history
  • Loading branch information
jbein committed Jun 6, 2017
1 parent 8c5bc15 commit d6d484b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions check_hydra.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
ledNowReq = requests.get("http://" + host + "/api/colors")
ledNowVal = json.loads(ledNowReq.text)

leds = ",".join(["=".join([key, str(val*1.0/10)]) for key, val in ledNowVal.items()])
leds = " ".join(["=".join([key, str(val*1.0/10)]) for key, val in ledNowVal.items()])

print("OK - LED's: " + leds + "|" + leds)
print("OK - LED's: " + leds + " | " + leds)
sys.exit(0)

elif mode == 'power':
Expand All @@ -41,9 +41,9 @@
wattsByLed[key] = (value/100 * ledNowVal[key]/10)
watts = watts + wattsByLed[key]

perfWattsByLed = ",".join(["=".join([key, str(val*1.0/1000)]) for key, val in wattsByLed.items()])
perfWattsByLed = " ".join(["=".join([key, str(val*1.0/1000)]) for key, val in wattsByLed.items()])

print("OK - " + str(watts/1000) + " Watt's are in use. | watt=" + str(watts/1000) + "," + perfWattsByLed)
print("OK - " + str(watts/1000) + " Watt's are in use. | watt=" + str(watts/1000) + " " + perfWattsByLed)
sys.exit(0)
else:
print("UNKNOWN - Mode's are: leds, power")
Expand Down

0 comments on commit d6d484b

Please sign in to comment.