Skip to content

Commit

Permalink
Merge pull request #2 from mboisson/water
Browse files Browse the repository at this point in the history
convert water leak info to 1/0
  • Loading branch information
mboisson authored Oct 20, 2022
2 parents bbdce48 + 2897b0e commit 2368c9c
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 2368c9c

Please sign in to comment.