mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Add checks
Add checks
This commit is contained in:
parent
9cab37e0f3
commit
dbf84d7813
@ -146,11 +146,15 @@ else:
|
|||||||
def StartDecode():
|
def StartDecode():
|
||||||
# print("Decoding\n{}".format(obj))
|
# print("Decoding\n{}".format(obj))
|
||||||
|
|
||||||
|
if ("StatusSNS" in obj):
|
||||||
if ("Time" in obj["StatusSNS"]):
|
if ("Time" in obj["StatusSNS"]):
|
||||||
time = str(" from status report taken at {}".format(obj["StatusSNS"]["Time"]))
|
time = str(" from status report taken at {}".format(obj["StatusSNS"]["Time"]))
|
||||||
|
|
||||||
|
if ("Status" in obj):
|
||||||
if ("FriendlyName" in obj["Status"]):
|
if ("FriendlyName" in obj["Status"]):
|
||||||
print("\nDecoding information for device {}{}".format(obj["Status"]["FriendlyName"][0], time))
|
print("\nDecoding information for device {}{}".format(obj["Status"]["FriendlyName"][0], time))
|
||||||
|
|
||||||
|
if ("StatusLOG" in obj):
|
||||||
if ("SetOption" in obj["StatusLOG"]):
|
if ("SetOption" in obj["StatusLOG"]):
|
||||||
options = []
|
options = []
|
||||||
option = obj["StatusLOG"]["SetOption"][0]
|
option = obj["StatusLOG"]["SetOption"][0]
|
||||||
@ -164,7 +168,7 @@ def StartDecode():
|
|||||||
for i in range(len(options)):
|
for i in range(len(options)):
|
||||||
print(" {}".format(options[i]))
|
print(" {}".format(options[i]))
|
||||||
|
|
||||||
|
if ("StatusMEM" in obj):
|
||||||
if ("Features" in obj["StatusMEM"]):
|
if ("Features" in obj["StatusMEM"]):
|
||||||
features = []
|
features = []
|
||||||
for f in range(5):
|
for f in range(5):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user