Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dbsqp authored Apr 12, 2021
2 parents 7a46e4f + c37b631 commit 0a61d36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/image-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build-Dev

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image-master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build-Master

on:
push:
Expand Down
4 changes: 3 additions & 1 deletion nut-influxdbv2-exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
write_api = client.write_api(write_options=SYNCHRONOUS)



# define convert
def convert_to_type(s):
try:
Expand Down Expand Up @@ -100,7 +101,7 @@ def construct_object(data, remove_keys, host):
fields[k] = convert_to_type(v)

#watts = float(nut_watts) if nut_watts else float(fields['ups.realpower.nominal'])
#fields['ups.power'] = watts * 0.01 * fields['ups.load']
#fields['ups.watts'] = watts * 0.01 * fields['ups.load']

result ={
'measurement': 'ups',
Expand Down Expand Up @@ -144,6 +145,7 @@ def construct_object(data, remove_keys, host):
print(tb)
print("Error getting data from NUT at "+ipaddress+" "+host)
exit(1)


json_body = construct_object(ups_data, remove_keys, host)

Expand Down

0 comments on commit 0a61d36

Please sign in to comment.