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