Closed YraganTron closed 11 months ago
Hi Arseny, and thank you for opening this issue. :)
You can use the properties argument for Client.__init__ like so:
properties
Client.__init__
from aiomqtt import Client from paho.mqtt.properties import Properties from paho.mqtt.packettypes import PacketTypes properties = Properties(PacketTypes.CONNECT) properties.SessionExpiryInterval = 1234 client = aiomqtt.Client(..., properties=properties)
Note that I did not run the code above. There may be typos or the like.
The current API for MQTTv5 properties is admittedly pretty awkward to use. It's a great place to make a PR and improve this situation. :+1:
I hope this helps!
Hi Arseny, and thank you for opening this issue. :)
You can use the
properties
argument forClient.__init__
like so:Note that I did not run the code above. There may be typos or the like.
The current API for MQTTv5 properties is admittedly pretty awkward to use. It's a great place to make a PR and improve this situation. :+1:
I hope this helps!