fix send_command payloadType
Used toType instead of payloadType...
This commit is contained in:
parent
e233fe933e
commit
5ac6663502
2 changed files with 4 additions and 5 deletions
|
|
@ -183,12 +183,12 @@ class MQTTHelperBot:
|
|||
cmdjson["payloadType"],
|
||||
)
|
||||
try:
|
||||
if cmdjson["toType"] == "x":
|
||||
if cmdjson["payloadType"] == "x":
|
||||
await self.Client.publish(
|
||||
ttopic, str(cmdjson["payload"]).encode(), QOS_0
|
||||
)
|
||||
|
||||
if cmdjson["toType"] == "j":
|
||||
if cmdjson["payloadType"] == "j":
|
||||
await self.Client.publish(
|
||||
ttopic, json.dumps(cmdjson["payload"]).encode(), QOS_0
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue