Skip to content

Commit

Permalink
Merge pull request #22 from mboisson/water
Browse files Browse the repository at this point in the history
convert water leak info to 1/0
  • Loading branch information
proffalken authored Oct 25, 2023
2 parents 530fd12 + 2897b0e commit b4850e7
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 b4850e7

Please sign in to comment.