From 6ec01d8632ac04c0ea05200389f44ca33ddc83f8 Mon Sep 17 00:00:00 2001 From: 3735943886 <9522390+3735943886@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:10:42 +0900 Subject: [PATCH] Rearrange placement of the encoding argument description in documentation --- docs/reference.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference.rst b/docs/reference.rst index feb2868..a1fff92 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -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. @@ -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.