Simple notification rule; [ERROR: Conversion ='%']


I am currently getting to know OpenHab2.
One of the first things to do was to try to get a notification working with a humidity sensor (a Devolo MT02755).
The rule that I set up - being based on a sample out of this community - is

// This rule file is autogenerated by HABmin.
// Any changes made manually to this file will be overwritten next time HABmin rules are saved.

// Imports
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*

// Global Variables

var lastSent = null

rule "Feuchte Kellergang"
Item zwave_device_5e813456_node4_sensor_relhumidity received update

    if(lastSent == null || lastSent.before(now.minusMinutes(10))) {
        if (zwave_device_5e813456_node4_sensor_relhumidity.state > 70)
                sendTelegram("bot1", "Luftfeuchtigkeit im Kellergang > 70%", zwave_device_5e813456_node4_sensor_relhumidity.state.toString)
                lastSent = now

I hoped to have it done in the right way, but looking at the logs, I find the following errors:

2017-11-05 14:20:36.760 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'meldung_feuchte_kelgal.rules'
2017-11-05 16:45:59.095 [WARN ] [l.serialmessage.SendDataMessageClass] - NODE 4: Already processed another send data request for this callback Id, ignoring.

2017-11-05 16:46:09.133 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Feuchte Kellergang': Conversion = '%'

So seemingly, something is tried to be converted, but I do not know what and why - and most important how to deal with it.
Thank you for your help,
best regards,


A guess from me is that you use the formatted text but you don’t have a formatter in your string to which the value from the third argument should be placed to.

Try to use the Send a text message with a formatted message and actually use the value in the format string by replacing the 70 with a %s which will be replaced by the third argument.
Also you have to escape the percentage, I think with an percentage.

sendTelegram("bot1", "Luftfeuchtigkeit im Kellergang > %s%%", zwave_device_5e813456_node4_sensor_relhumidity.state.toString)

Or use the Send a text message to telegram chat by omitting the third value which expects to be used with a formatter. Don’t forget to escape the percentage.

sendTelegram("bot1", "Luftfeuchtigkeit im Kellergang > 70%%")

@Josar: Thank you for your support. This is working now, I just combined these two possibilities to

sendTelegram("bot1", "Luftfeuchtigkeit im Kellergang > 70%%, aktuell bei %s%%", zwave_device_5e813456_node4_sensor_relhumidity.state.toString)

Once again - thank you,
best regards,