Skip to content
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
6 changes: 3 additions & 3 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,6 @@ An optional ``str_expr`` can be used to match the MQTT message data, and the tri
if that expression evaluates to ``True`` or non-zero. This expression has available these
variables:

An optional ``encoding`` argument specifies the character encoding used to decode the MQTT payload
(default is **"utf-8"**). It can be explicitly set to other encodings if necessary.

- ``trigger_type`` is set to "mqtt".
- ``topic`` is set to the topic the message was received on.
- ``qos`` is set to the message QoS.
Expand All @@ -828,6 +825,9 @@ An optional ``encoding`` argument specifies the character encoding used to decod
required function argument an exception will be thrown, use payload_obj=None.
- ``retain`` is set to the message retain flag. True if the message was retained, False otherwise.

An optional ``encoding`` argument specifies the character encoding used to decode the MQTT payload
(default is **"utf-8"**). It can be explicitly set to other encodings if necessary.

When the ``@mqtt_trigger`` occurs, those same variables are passed as keyword arguments to the
function in case it needs them. Additional keyword parameters can be specified by setting the
optional ``kwargs`` argument to a ``dict`` with the keywords and values.
Expand Down
Loading