]> git.basschouten.com Git - openhab-addons.git/commitdiff
[logreader] Correct example for telegram binding (#9663)
authorSören Berger <soerenbe@users.noreply.github.com>
Wed, 6 Jan 2021 19:39:01 +0000 (20:39 +0100)
committerGitHub <noreply@github.com>
Wed, 6 Jan 2021 19:39:01 +0000 (11:39 -0800)
The original example references to the old telegram action, which is no longer supported. The updated example uses the (new) telegram binding.

Signed-off-by: Sören Berger <soeren.berger@u1337.de>
bundles/org.openhab.binding.logreader/README.md

index 2ad53f7d683c7a1eeb34d0f3015a169cde872753..9e142545841d9699af9e09a7639cdfabbdef5fa1 100644 (file)
@@ -99,15 +99,15 @@ rule "LogReader"
     end
 ```
 
-Use the rules with your Telegram Bot (need openHAB Telegram Action installed and configured)
+Use the rules with your Telegram Bot (need openHAB Telegram Binding installed and configured)
 
 ```xtend
 rule "LogReader"
     when
         Channel 'logreader:reader:openhablog:newErrorEvent' triggered
     then
-        // do something
-       sendTelegram("bot3", "*ERROR* LogReader Event!\n%s Errors are in the log! Here is the last row of it:\n`%s`", logreaderErrors.state.toString, logreaderLastError.state.toString)
+        val telegramAction = getActions("telegram","telegram:telegramBot:myBot")
+        telegramAction.sendTelegram("*ERROR* LogReader Event!\n%s Errors are in the log! Here is the last row of it:\n`%s`", logreaderErrors.state.toString, logreaderLastError.state.toString)
     end
 ```