You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs: Improve documentation about how relative file paths are resolved
Both when loading external service plugins and when loading custom
functions, relative paths are resolved from the folder of the
"mqttwarn.ini" configuration file.
You can define custom functions in a Python file which you configure as
3104
+
`functions`in the `[default]` section of the `mqttwarn.ini` configuration
3105
+
file, as outlined above. When relative file names are given, they will be
3106
+
resolved from the directory of the `mqttwarn.ini` file, which is, by default,
3107
+
the `/etc/mqttwarn` folder.
3108
+
3093
3109
If a functionoperating on a message (i.e. within `format =`) returns `None` or an empty string, the target notification is suppressed.
3094
3110
3095
3111
The optional `srv` is an object with some helper functions. In particular, these allow us to use _mqttwarn_'s logging and MQTT publish functions, as in this example:
@@ -3412,7 +3428,12 @@ plugins, there are two options.
3412
3428
### Service plugin from package
3413
3429
3414
3430
This configuration snippet outlines how to load a custom plugin from a Python
3415
-
module referenced in "dotted" notation.
3431
+
module referenced in"dotted" notation. Modules will be searched forin all
3432
+
directories listed in [`sys.path`]. Custom directories can be added by using the
0 commit comments