Added support for tuples in C4Interface
This commit is contained in:
parent
2bcfbd643e
commit
e17873c648
1 changed files with 8 additions and 1 deletions
|
@ -30,7 +30,14 @@ class C4Interface():
|
||||||
if type(item) == dict:
|
if type(item) == dict:
|
||||||
item["qos"] = self.qos
|
item["qos"] = self.qos
|
||||||
item["retain"] = self.retain
|
item["retain"] = self.retain
|
||||||
|
elif type(item) == tuple:
|
||||||
|
item = (
|
||||||
|
item[0] or self.topic, # topic
|
||||||
|
item[1], # payload
|
||||||
|
self.qos, # qos
|
||||||
|
self.retain # retain
|
||||||
|
)
|
||||||
|
|
||||||
if self.debug: return print("[DEBUG] inhibited messages:", cmd)
|
if self.debug: return print("[DEBUG] inhibited messages:", cmd)
|
||||||
|
|
||||||
print(cmd)
|
print(cmd)
|
||||||
|
|
Loading…
Reference in a new issue