Skip to content

Minor updates to documentation #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def will_set(self, topic=None, payload=None, qos=0, retain=False):
"""Sets the last will and testament properties. MUST be called before `connect()`.

:param str topic: MQTT Broker topic.
:param int,float,str payload: Last will disconnection payload.
:param int|float|str payload: Last will disconnection payload.
payloads of type int & float are converted to a string.
:param int qos: Quality of Service level, defaults to
zero. Conventional options are ``0`` (send at most once), ``1``
Expand Down Expand Up @@ -368,7 +368,7 @@ def add_topic_callback(self, mqtt_topic, callback_method):
"""Registers a callback_method for a specific MQTT topic.

:param str mqtt_topic: MQTT topic identifier.
:param function callback_method: Name of callback method.
:param function callback_method: The callback method.
"""
if mqtt_topic is None or callback_method is None:
raise ValueError("MQTT topic and callback method must both be defined.")
Expand Down Expand Up @@ -570,7 +570,7 @@ def publish(self, topic, msg, retain=False, qos=0):
"""Publishes a message to a topic provided.

:param str topic: Unique topic identifier.
:param str,int,float,bytes msg: Data to send to the broker.
:param str|int|float|bytes msg: Data to send to the broker.
:param bool retain: Whether the message is saved by the broker.
:param int qos: Quality of Service level for the message, defaults to zero.

Expand Down Expand Up @@ -653,7 +653,7 @@ def subscribe(self, topic, qos=0):
"""Subscribes to a topic on the MQTT Broker.
This method can subscribe to one topics or multiple topics.

:param str,tuple,list topic: Unique MQTT topic identifier string. If
:param str|tuple|list topic: Unique MQTT topic identifier string. If
this is a `tuple`, then the tuple should
contain topic identifier string and qos
level integer. If this is a `list`, then
Expand Down Expand Up @@ -713,7 +713,7 @@ def subscribe(self, topic, qos=0):
def unsubscribe(self, topic):
"""Unsubscribes from a MQTT topic.

:param str,list topic: Unique MQTT topic identifier string or list.
:param str|list topic: Unique MQTT topic identifier string or list.

"""
topics = None
Expand Down