mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Merge pull request #12090 from sfromis/patch-1
Expand decode-status to support all feature bits
This commit is contained in:
commit
ae6b81b047
@ -337,7 +337,11 @@ def StartDecode():
|
|||||||
if "StatusMEM" in obj:
|
if "StatusMEM" in obj:
|
||||||
if "Features" in obj["StatusMEM"]:
|
if "Features" in obj["StatusMEM"]:
|
||||||
features = []
|
features = []
|
||||||
for f in range(7):
|
maxfeatures = len(obj["StatusMEM"]["Features"])
|
||||||
|
if maxfeatures > len(a_features):
|
||||||
|
print("decode-status.py too old, does not support all feature bits")
|
||||||
|
maxfeatures = min(maxfeatures, len(a_features))
|
||||||
|
for f in range(maxfeatures + 1):
|
||||||
feature = obj["StatusMEM"]["Features"][f]
|
feature = obj["StatusMEM"]["Features"][f]
|
||||||
i_feature = int(feature,16)
|
i_feature = int(feature,16)
|
||||||
if f == 0:
|
if f == 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user