change status message on state change

This commit is contained in:
Michael Stöcker 2014-03-05 16:38:11 +01:00
parent 9c43a8eba6
commit 6a3143b2cc

View file

@ -39,10 +39,13 @@ state["lastchange"] = int(time.time())
if data:
if data == "0":
state["open"] = False
state["message"] = "no human being on location"
else:
state["open"] = True
state["message"] = "open for public"
else:
state["open"] = None
state["message"] = "open for public"
# JSON Decodieren und ausgeben
print json.dumps(raw)