change status message on state change #1
1 changed files with 3 additions and 0 deletions
3
state.py
3
state.py
|
@ -39,10 +39,13 @@ state["lastchange"] = int(time.time())
|
||||||
if data:
|
if data:
|
||||||
if data == "0":
|
if data == "0":
|
||||||
state["open"] = False
|
state["open"] = False
|
||||||
|
state["message"] = "no human being on location"
|
||||||
else:
|
else:
|
||||||
state["open"] = True
|
state["open"] = True
|
||||||
|
state["message"] = "open for public"
|
||||||
else:
|
else:
|
||||||
state["open"] = None
|
state["open"] = None
|
||||||
|
state["message"] = "open for public"
|
||||||
|
|
||||||
# JSON Decodieren und ausgeben
|
# JSON Decodieren und ausgeben
|
||||||
print json.dumps(raw)
|
print json.dumps(raw)
|
||||||
|
|
Reference in a new issue