Skip to content

Commit

Permalink
convert water leak info to 1/0
Browse files Browse the repository at this point in the history
  • Loading branch information
mboisson committed Oct 20, 2022
1 parent bbdce48 commit 2897b0e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ def metrics():
attrib["currentValue"] = 1
else:
attrib["currentValue"] = 0
if attrib["name"] == "water":
if attrib["currentValue"] == "dry":
attrib["currentValue"] = 1
else:
attrib["currentValue"] = 0
if attrib["name"] == "power":
if attrib["currentValue"] == "on":
attrib["currentValue"] = 1
Expand Down

0 comments on commit 2897b0e

Please sign in to comment.