Skip to content

Commit

Permalink
update InternalBattery-0 > InternalBattery
Browse files Browse the repository at this point in the history
  • Loading branch information
dbsqp authored Apr 18, 2021
1 parent 8cda73d commit 7127667
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nut-influxdbv2-exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def construct_object(data, remove_keys, host):
tags["hardware"]=':'.join(v[i:i+2] for i in range(0,12,2))
elif k == "device.model":
w = v.split("FW:", 2)
tags["model"]=w[0].strip()
if v == "InternalBattery-0":
tags["model"]="InternalBattery"
else
tags["model"]=w[0].strip()
else:
if k in remove_keys:
continue
Expand Down

0 comments on commit 7127667

Please sign in to comment.